input: Write a python function to generate all permutations of a given list.
  assert permutation([1, 2, 3]) == [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]]
  assert permutation(['a', 'b', 'c']) == [['a', 'b', 'c'], ['a', 'c', 'b'], ['b', 'a', 'c'], ['b', 'c', 'a'], ['c', 'a', 'b'], ['c', 'b', 'a']]
  assert permutation([0, 1]) == [[0, 1], [1, 0]]
output: def permutation(lst):
      if len(lst) == 0:
          return []
      if len(lst) == 1:
          return [lst]
      perms = []
      for i in range(len(lst)):
          current = lst[i]
          remaining = lst[:i] + lst[i+1:]
          for p in permutation(remaining):
              perms.append([current] + p)
      return perms