input: Write a python function that takes a list of strings as input and returns the longest string. In case of a tie, return the first occurring string. If the list is empty, the function should 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)