input: Write a Python function that takes a list of strings as input and returns the string with the greatest length. If two or more strings have the same length, return the one that appears first. If the list is empty, return None.
  assert longest([]) == None
  assert longest(['x', 'y', 'z']) == 'x'
  assert longest(['x', 'yyy', 'zzzz', 'www', 'kkkk', 'abc']) == 'zzzz'
output: def longest(strings):
      if not strings:
          return None
      return max(strings, key=len)