Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Counter makes easy :) solution in Clear category for Verify Anagrams by marcopunteri
from collections import Counter
def verify_anagrams(a, b):
a,b = ''.join(x for x in a.lower().split()),''.join(x for x in b.lower().split())
return Counter(a) == Counter(b)
if __name__ == '__main__':
print(verify_anagrams(" Hi all ","all hi"))
April 27, 2021
Comments: