input: Write a python function to generate all permutations of a given string.
  assert permutations("abc") == ['abc', 'acb', 'bac', 'bca', 'cab', 'cba']
  assert permutations("a") == ['a']
  assert permutations("ab") == ['ab', 'ba']
output: def permutations(s):
      if len(s) == 1:
          return [s]
      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