Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
l = ['Welcome','to','ComputerTutor','Python','Revision']
m = 0
w = None
for i in range(len(l)):
if len(l[i])>m:
word=l[i]
m=len(l[i])
print('Longest word present in list is:', word)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment