'''An anagram of a string is another string that contains the same characters,
only the order of characters can be different.
For example, “abcd” and “dabc”, silent and listen, triangle and integral are an anagram of each other.'''
def isAnagram(str1, str2):
return sorted(str1) == sorted(str2)
print(isAnagram("silentr", "lirsten"))
#CodeWithCougar
Please Subscribe to Code With Cougar:
/ @code-with-cougar