I need to go through a list and print the longest words in it. I can do this for just one word, but can\'t figure out how to print more than one, if there are two words
Can always use a lambda function as well
longest = len(sorted(list, key=len)[-1]) filter(lambda item: len(item) == longest, list)
will yield the longest words
shortest = len(sorted(list, key=len)[0]) filter(lambda item: len(item) == shortest, list)
Will yield the shortest words