#try to avoid input function a = [] c = "" for i in range(10): b = input("Enter any string :") a.append(b) if len(b) >= len(c): c = b print(len(c)," is the longest length of the word")
Click the run button. Try to avoid input() function.