Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Counter(first_word) == Counter(second_word) solution in Clear category for Verify Anagrams by martin.pilka
def verify_anagrams(first_word, second_word):
import re
from collections import Counter
w1 = re.sub('\s+', '', first_word.lower())
w2 = re.sub('\s+', '', second_word.lower())
return Counter(w1) == Counter(w2)
Feb. 4, 2019