input: Write a function to find the longest string in a given list of strings and return the longest string. If the list is empty, return an empty string.
  def longest_string(strings):
      if not strings:
          return ''
      longest = strings[0]
      for string in strings[1:]:
          if len(string) > len(longest):
              longest = string
      return longest
  
  assert longest_string(['foo', 'bar', 'longer', 'short']) == 'longer'
  assert longest_string(['apple', 'banana', 'cherry']) == 'banana'
  assert longest_string([]) == ''
  assert longest_string(['single']) == 'single'
output: def longest_string(strings):
      if not strings:
          return ''
      longest = strings[0]
      for string in strings[1:]:
          if len(string) > len(longest):
              longest = string
      return longest