Skip to content

Commit 5cbe348

Browse files
committed
valid anangram
1 parent 7bb6913 commit 5cbe348

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

valid-anagram/Sung-Heon.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class Solution:
2+
def isAnagram(self, s: str, t: str) -> bool:
3+
s = list(s)
4+
t = list(t)
5+
try:
6+
for i in s:
7+
if len(t) == 0:
8+
return False
9+
t.remove(i)
10+
except:
11+
return False
12+
if len(t) == 0:
13+
return True
14+
else :
15+
return False

0 commit comments

Comments
 (0)