# Step 4: Checking if the two strings are anagram or not if len(str1)==len(str2): if sorted(str1)==sorted(str2): print("This is an anagram!") else: print("This is not an anagram.") else: print("This is not an anagram.")