input: Write a python function to generate the powerset of a list.
  assert powerset([1, 2, 3]) == [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)]
  assert powerset([1, 2]) == [(), (1,), (2,), (1, 2)]
  assert powerset([]) == [()]
output: def powerset(lst):
      from itertools import chain, combinations
      return list(chain.from_iterable(combinations(lst, r) for r in range(len(lst) + 1)))