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