input: Write a python function to generate all possible anagrams of a given string.
  assert sorted(generate_anagrams("abc")) == sorted(['abc', 'acb', 'bac', 'bca', 'cab', 'cba'])
  assert sorted(generate_anagrams("ab")) == sorted(['ab', 'ba'])
  assert sorted(generate_anagrams("a")) == sorted(['a'])
output: def generate_anagrams(s):
      if len(s) <= 1:
          return [s]
      else:
          anagrams = []
          for i, char in enumerate(s):
              for perm in generate_anagrams(s[:i] + s[i+1:]):
                  anagrams.append(char + perm)
          return anagrams