You are given a collection of words, for example:
words_set = {'plea', 'medical', 'listen', 'leap', 'decimal', 'silent', 'pale', 'enlist'}
Your task is to write a Python program that:
1.) Finds all pairs of words in words_set that are anagrams of one another.
2.) Prints each unique pair only once (i.e., ('listen', 'silent') is the same as ('silent', 'listen'), so only print one).
3.) Ensures the pair is output in a consistent order to avoid duplicates.
Use comments to explain your code so that we can get your logic!
I'm going to hold off on this until: 1) someone weighs in with a response, or 2) 10 days have gone by. I'm going to hold off because of that "beginner" stipulation!
If no one has shown up within 10 days, I've got to believe that no one is coming, at which time, I'm going to stick my nose in this pot
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.