input: def get_max_min(lst):
      """ Returns the maximum and minimum values in a given list.
      >>> get_max_min([3, 4, 9, 7, 1])
      (1, 9)
      >>> get_max_min([10, -5, 20, 15, -2])
      (-5, 20)
      """
output:     if not lst:
          return None, None
      min_val = max_val = lst[0]
      for num in lst:
          if num < min_val:
              min_val = num
          elif num > max_val:
              max_val = num
      return min_val, max_val