Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Verify Anagrams by Red_Ale
def verify_anagrams(a, b):
a = a.replace(" ", "").lower()
b = b.replace(" ", "").lower()
return sorted(a) == sorted(b)
if __name__ == '__main__':
print("Example:")
print(verify_anagrams('Programming', 'Gram Ring Mop'))
# These "asserts" are used for self-checking and not for an auto-testing
assert verify_anagrams('Programming', 'Gram Ring Mop') == True
assert verify_anagrams('Hello', 'Ole Oh') == False
assert verify_anagrams('Kyoto', 'Tokyo') == True
print("Coding complete? Click 'Check' to earn cool rewards!")
Jan. 13, 2022