Skip to content

Instantly share code, notes, and snippets.

@computer-tutor
Created April 28, 2020 08:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save computer-tutor/7a19550b06cf44abb0ee66aa7f164270 to your computer and use it in GitHub Desktop.
Save computer-tutor/7a19550b06cf44abb0ee66aa7f164270 to your computer and use it in GitHub Desktop.
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