Skip to content

Commit 2825e7b

Browse files
added code for palindrome string
1 parent 94503a8 commit 2825e7b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/Palindrome.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class Solution:
2+
def isPalindrome(self, x: int) -> bool:
3+
x = str(x)
4+
if x[::-1] == x[::]:
5+
return True
6+
else:
7+
return False

0 commit comments

Comments
 (0)