Skip to main content
Practice

anagram-check

---
id: anagram-check
title: Anagram Checker - Problem Solution
description: Implement a function to determine if two given strings are anagrams of each other
tags:
- Python
- Strings
sidebar_position: 14
isPublic: false
---

# Anagram Checker - Problem Solution

Explore three methods to determine if two strings are anagrams of each other.

```python title="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.