input: Write a python function that takes a list of strings as input and returns the string with the most characters. If there are ties, return the earliest string in the list. If the list is empty, return None.
  assert longest([]) == None
  assert longest(['a', 'b', 'c']) == 'a'
  assert longest(['a', 'bcd', 'defg', 'hij', 'klmn', 'opq']) == 'defg'
output: def longest(strings):
      if not strings:
          return None
      max_string = strings[0]
      for string in strings[1:]:
          if len(string) > len(max_string):
              max_string = string
      return max_string