Created
April 28, 2020 08:04
-
-
Save computer-tutor/7a19550b06cf44abb0ee66aa7f164270 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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