Skip to content

Commit 66335b3

Browse files
committed
중복 연산 제거
1 parent de5164c commit 66335b3

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

valid-palindrome/devyejin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# isalnum() : 문자열이 영어, 한글 숫자 -> True , 아니라면 False
22
class Solution:
33
def isPalindrome(self, s: str) -> bool:
4-
s = s.replace(" ", "")
54
changed_s = [c.lower() for c in s if c.isalnum()]
65
return changed_s == changed_s[::-1]

0 commit comments

Comments
 (0)