Last active
November 14, 2016 14:37
-
-
Save rich-97/1ff98ed044336310db65ff8d8dbb685d to your computer and use it in GitHub Desktop.
the longest word in python
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
string = 'example example2 proof guide' | |
listStr = string.split() | |
listLength = [len(i) for i in listStr] | |
for i in listStr: | |
if (max(listLength) == len(i)): | |
print i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment