Anagram Checker - Problem Solution
Explore three methods to determine if two strings are anagrams of each other.
Method 1
def solution(s1, s2):
return sorted(s1) == sorted(s2)
Usage Example
Input/Output Example
result = solution("listen", "silent")
print(result) # Output: True
Want to learn more?
Join CodeFriends Plus membership or enroll in a course to start your journey.