Write a function longestWord(WORDS) in Python, that takes the dictionary, WORDS as an argument and returns the longest word (in lowercase) in the dictionary. If there are more than one words with the same length, return the first one in alphabetical order.
For example, Consider the following dictionary
WORDS={1:"Apple",2:"Orange",3:"Banana",4:"Grape",5:"Kiwi"}
The output should be:
banana
Answer:
Answer by student
Detailed answer by teachoo
The rest of the post is locked. Join Teachoo Black to see the full post.