input: Write a python function to find the minimum and maximum elements in a list.
  assert min_and_max([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5]) == (1, 9)
  assert min_and_max([-10, 0, 10, 7, -3, 2]) == (-10, 10)
  assert min_and_max([42]) == (42, 42)
output: def min_and_max(lst):
      if not lst:
          return None, None
      min_elem = min(lst)
      max_elem = max(lst)
      return min_elem, max_elem