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 c508360 commit 02f8451Copy full SHA for 02f8451
125-valid-palindrome/valid-palindrome.py
@@ -0,0 +1,4 @@
1
+class Solution:
2
+ def isPalindrome(self, s: str) -> bool:
3
+ org_str = ''.join([x for x in s.lower() if (ord(x) >= 97 and ord(x) <=122) or x.isnumeric()])
4
+ return org_str == org_str[::-1]
0 commit comments