3SOLVING ANAGRAMS
An anagram is a word formed by rearranging the letters of another word. For example, Elvis yields the eerie trio evils, lives, and veils. Does this mean Elvis still lives but veils his evil existence? In the book Harry Potter and the Chamber of Secrets, “I am Lord Voldemort” is an anagram of the evil wizard’s real name, Tom Marvolo Riddle. “Lord Earldom Vomit” is also an anagram of Tom Marvolo Riddle, but author J.K. Rowling had the good sense to pass on that one.
In this chapter, first you’ll find all the anagrams for a given word or name. Then, you’ll write a program that lets a user interactively build an anagram phrase from ...
Get Impractical Python Projects now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.