input: Write a function that, given a list of strings, returns the longest one. If there are multiple strings of the same length, return the first one. If the input 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
      longest_str = strings[0]
      for s in strings:
          if len(s) > len(longest_str):
              longest_str = s
      return longest_str