We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa151cd commit 79812a5Copy full SHA for 79812a5
valid-palindrome/river20s.py
@@ -0,0 +1,7 @@
1
+import re
2
+
3
+class Solution(object):
4
+ def isPalindrome(self, s):
5
+ s = s.lower()
6
+ s = re.sub(r'[^a-z0-9]', '', s)
7
+ return s == s[::-1]
0 commit comments