We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc68cb3 commit 432fda4Copy full SHA for 432fda4
valid-palindrome/devyejin.py
@@ -0,0 +1,6 @@
1
+# isalnum() : 문자열이 영어, 한글 숫자 -> True , 아니라면 False
2
+class Solution:
3
+ def isPalindrome(self, s: str) -> bool:
4
+ s = s.replace(" ", "")
5
+ changed_s = [c.lower() for c in s if c.isalnum()]
6
+ return changed_s == changed_s[::-1]
0 commit comments