pyassistant

Group Anagrams

Given a list of strings, group the strings that are anagrams of each other. Return the grouped anagrams as a list of lists. Each group should contain strings that are anagrams, and the order of groups and order of strings inside each group does not matter.

Example:

Input:
['eat', 'tea', 'tan', 'ate', 'nat', 'bat']
Output:
[['eat', 'tea', 'ate'], ['tan', 'nat'], ['bat']]

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.