input: Write a python function to generate all permutations of a string.
  assert sorted(permutations("abc")) == sorted(['abc', 'acb', 'bac', 'bca', 'cab', 'cba'])
  assert sorted(permutations("a")) == sorted(['a'])
  assert sorted(permutations("")) == sorted([''])
output: def permutations(s):
      if len(s) == 0:
          return [""]
      perm_list = []
      for i, char in enumerate(s):
          for perm in permutations(s[:i] + s[i+1:]):
              perm_list.append(char + perm)
      return perm_list