Untitled
Anonymous
plain_text
08/21/2024 5:17 PM
500 B
22
Indexable
#insertion sort
def insertion_sort(word1,word2):
count={}
if len(word1) == len(word2):
for i in word1:
count[i]+=1
for j in word2:
count[j]+=1
word1,word2 = word2,word1
return True
else:
print("not anagram")
word1=input("enter word 1\n")
word2=input("enter word 2\n")
print(inseEditor is loading...
Leave a Comment