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

Ask and you shall receive - within reason. Press the purple button so I can analyze your code.