input: Write a python function to calculate the median of a list of numbers.
  assert median([-2.3, 5.6, 7.6, 4.5, 9.8]) == 5.6
  assert median([1, 2, 3, 4, 5, 6]) == 3.5
  assert median([10, 20, 30, 40, 50]) == 30
output: def median(lst):
      sorted_lst = sorted(lst)
      n = len(sorted_lst)
      middle = n // 2
  
      if n % 2 == 0:
          return (sorted_lst[middle - 1] + sorted_lst[middle]) / 2.0
      else:
          return sorted_lst[middle]