Question: Write a function called anagrams(file_name) that accepts a file_name that contains a list of words (one per row) and returns the larget set of anagrams

Write a function called anagrams(file_name) that accepts a file_name that contains a list of words (one per row) and returns the larget set of anagrams in the word list. i.e. art,tar,rat would be a set of 3. If there is a tie it should return one of the sets. First try running it on test.txt, but it should run in a reasonable amount of time (<3m) if using unixdict.txt.

Step by Step Solution

3.48 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a Python function called anagrams that reads a list of words from a file and returns the large... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!