input: Write a python function to find the longest word in a list of words.
  assert longest_word(['apple', 'banana', 'cherry', 'date']) == 'banana'
  assert longest_word(['dog', 'cat', 'elephant', 'tiger']) == 'elephant'
  assert longest_word(['red', 'blue', 'green', 'yellow']) == 'yellow'
output: def longest_word(words):
      return max(words, key=len)