📅  最后修改于: 2022-03-11 14:46:10.727000             🧑  作者: Mango
from collections import defaultdict
def findAnagrams(input_str):
anagram = defaultdict(list)
for word in input_str:
anagram[str(sorted(word))].append(word)
return list(anagram.values())