csc-python-solutions/15/b/3 - Poetic Analysis.py
2021-02-22 11:34:20 +01:00

8 lines
185 B
Python

txt = input().lower().split()
while txt[-1] != "###":
txt += input().lower().split()
m = [0]*len(txt)
for i in range(len(txt)):
m[i]=txt.count(txt[i])
print(txt[m.index(max(m))])