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