def sayan_anagram(str1, str2):
str1 = str1.replace(" ", "").lower()
str2 = str2.replace(" ", "").lower()
str1 = ''.join(sorted(str1))
str2 = ''.join(sorted(str2))
if str1 == str2:
return True
else:
return False
str1 = input("Enter first string: ")
str2 = input("Enter second string: ")
result = sayan_anagram(str1, str2)
if result:
print(“The two strings are anagrams.”)
else:
print(“The two strings are not anagrams.”)