USING PYTHON please show code that I can copy and paste into
USING PYTHON please show code that I can copy and paste into the text editor thank you!
1st problem:
Given a string. Delete from it all the characters whose indices are divisible by 3.
2nd problem:
Given the text: the first line contains the number of lines, then given the lines of words. Print the word in the text that occurs most often. If there are many such words, print the one that is less in the alphabetical order.
Solution
st = input(\"Enter a string:\")
lt = []
for i in range(0,len(st)):
if i%3 != 0:
lt.append(st[i])
ans = \'\'.join(lt)
print(\"The answer is \"+ans)
