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 9a56411 commit f65a8ccCopy full SHA for f65a8cc
valid-palindrome/TreeStone94.py
@@ -0,0 +1,18 @@
1
+class Solution:
2
+ def isPalindrome(self, s: str) -> bool:
3
+ answer = ""
4
+ for c in s:
5
+ o = ord(c)
6
+ if 65 <= o <=90:
7
+ answer += chr(o+32)
8
+ elif 97 <= o <= 122:
9
+ answer += c
10
+ elif 48 <= o <= 57:
11
12
+
13
+ if answer == "" or answer == answer[::-1]:
14
+ return True
15
+ else:
16
+ return False
17
18
0 commit comments