input: Write a python function to generate all permutations of a string.
  assert permutations('abc') == [['a', 'b', 'c'], ['a', 'c', 'b'], ['b', 'a', 'c'], ['b', 'c', 'a'], ['c', 'a', 'b'], ['c', 'b', 'a']]
  assert permutations('ab') == [['a', 'b'], ['b', 'a']]
  assert permutations('a') == [['a']]
output: def permutations(s):
      if len(s) == 1:
          return [[s]]
      perm_list = []
      for i in range(len(s)):
          part = s[i]
          rest = s[:i] + s[i+1:]
          for p in permutations(rest):
              perm_list.append([part] + p)
      return perm_list