input: def find_median(lst: list):
      """Calculate and return the median value from the list lst.
      >>> find_median([3, 1, 2, 4, 5])
      3
      >>> find_median([-10, 4, 6, 1000, 10, 20])
      15.0
      """
output:     lst.sort()
      n = len(lst)
      mid = n // 2
      if n % 2 == 0:
          return (lst[mid - 1] + lst[mid]) / 2
      else:
          return lst[mid]