Your question is Checking String Anagrams. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Flyways may compare normalized text labels, such as route or operational messages, where two strings are equivalent if they contain the same characters with the same frequencies. Implement a function that determines whether two strings are anagrams.
Two strings are anagrams when one can be rearranged to produce the other. Treat characters as case-sensitive, and count spaces and punctuation as ordinary characters. The strings must have equal length and identical character multiplicities.
Implement is_anagram(s, t), where s and t are strings. Return True if they are anagrams and False otherwise. The function must not modify either input string.
def is_anagram(s, t):