Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
collections.Counter solution in Clear category for Verify Anagrams by David_Jones
from collections import Counter
structure = lambda s: Counter(s.replace(' ', '').lower())
def verify_anagrams(first_word, second_word):
return structure(first_word) == structure(second_word)
May 13, 2019
Comments: