Loading...
Loading...
Loading...
Two phrases are anagrams when they use exactly the same letters the same number of times. Spaces and capital letters are ignored.
Read two lines and print Yes if they are anagrams, otherwise No.
Yes or No.Example
Input
listen silent
Output
Yes
The same six letters.
Try the problem first. Open one hint at a time.
Remove the spaces and lower-case both lines.
sorted(text) gives the characters in order; two anagrams sort to the same list.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor