compare 2 strings and return true if anagrams python code example
Example: check if two strings are anagrams python
if sorted(s1) == sorted(s2):
print("The strings are anagrams.")
else:
print("The strings aren't anagrams.")
if sorted(s1) == sorted(s2):
print("The strings are anagrams.")
else:
print("The strings aren't anagrams.")