Skip to content

Commit 54de42f

Browse files
Create anagram1.py
1 parent ceeabdd commit 54de42f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class Solution:
2+
def isAnagram(self, s: str, t: str) -> bool:
3+
s = s.replace(" ","").lower()
4+
t = t.replace(" ","").lower()
5+
6+
return sorted(s) == sorted(t)

0 commit comments

Comments
 (0)