LearnPy Hub
← Recursion & Lambda problems
Easy

Longest Word With a Key

Read words and print the longest one using max(words, key=lambda w: len(w)) (the first one wins a tie).

Input

Words separated by spaces.

Output

One word.

Sample 1

Input
a bbb cc
Output
bbb

Sample 2

Input
Python is fun
Output
Python
solution.py
Output appears here
Longest Word With a Key · Python practice problem · LearnPy Hub