Given a list of strings, write a function to find the word with the maximum length. If there are multiple words with the same maximum length, return the first one encountered.
Example:
Input:
['apple', 'banana', 'kiwi', 'pineapple']
Output:
'pineapple'
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.