input: Write a python function to find the maximum value in a list.
  assert find_max([19, 7, 32, 1, 8, 27]) == 32
  assert find_max([10, 20, 30, 40, 50]) == 50
  assert find_max([-1, -50, -3, -4, -2]) == -1
output: def find_max(lst):
      if not lst:
          return None
      max_val = lst[0]
      for num in lst:
          if num > max_val:
              max_val = num
      return max_val