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