input: Write a python function to find the maximum difference between any two elements in a list.
  assert max_difference([4, 8, 2, 10, 6]) == 8
  assert max_difference([1, 2, 3, 4, 5]) == 4
  assert max_difference([10, 10, 10]) == 0
  assert max_difference([-1, -2, -3, -4]) == 3
output: def max_difference(lst):
      if not lst or len(lst) < 2:
          return 0
      min_val = min(lst)
      max_val = max(lst)
      return max_val - min_val