Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Verify Anagrams by m.dziardziel
def verify_anagrams(first_word, second_word):
first_word=first_word.lower()
second_word=second_word.lower()
fw=[]
sw=[]
for a in first_word:
if a!=' ':
fw.append(a)
for a in second_word:
if a!=' ':
sw.append(a)
fw.sort()
sw.sort()
if len(sw)!=len(fw):
return False
b=0
for a in fw:
if a!= sw[b]:
return False
b=b+1
return True
Nov. 10, 2016