anagram tag

1 questions


1 answers
95 views
0
I have a question about the Python grouping module.

words = ['abc', 'cab', 'cafe', 'goo', 'face']from itertools import groupbya = [list(group) for key,group in groupby(sorted(words,key=sorted),sorted)]print(a)I found a module in Python that groups anag...

1 years ago

© 2024 OneMinuteCode. All rights reserved.