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