input: def longest_string(str_list):
      longest_str = ""
      for s in str_list:
          if len(s) > len(longest_str):
              longest_str = s
      return longest_str
  
  """
  >>> longest_string(['foo', 'test', 'longstring', 'bar'])
  'longstring'
  """
output:     longest_str = ""
      for s in str_list:
          if len(s) > len(longest_str):
              longest_str = s
      return longest_str