input: def longest_string(str_list: List[str]) -> str:
      """
      Given a list of strings, this function returns the longest string in the list.
      
      >>> longest_string(['foo', 'test', 'longstring', 'bar'])
      'longstring'
      >>> longest_string(['short', 'medium', 'longest'])
      'longest'
      """
      longest_str = ''
      for str in str_list:
          if len(str) > len(longest_str):
              longest_str = str
      return longest_str
output:     longest_str = ''
      for str in str_list:
          if len(str) > len(longest_str):
              longest_str = str
      return longest_str