pyassistant

Longest Word in a List

Given a list of words, write a function to find the longest word in the list. If there are multiple longest words, return the first one encountered.

Example:

Input:
['apple', 'banana', 'kiwi', 'strawberry', 'orange']
Output:
'strawberry'

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.