Loading...
Loading...
Loading...
Two lowercase words are given on separate lines. Print yes if the second is made from exactly the same letters as the first (an anagram), otherwise print no.
Example 1
Input
listen silent
Output
yes
The same letters.
Example 2
Input
aab abb
Output
no
Same set of letters, different counts.
Try the problem first. Open one hint at a time.
Count how many times each letter appears in both words.
Two Counters are equal when every letter has the same count.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor