0
0
Read Time:21 Second
Given an integer x
, return true
if x
is palindrome integer.
An integer is a palindrome when it reads the same backward as forward.
- For example,
121
is a palindrome while123
is not.
Python Solution
class Solution(object):
def isPalindrome(self, x):
"""
:type x: int
:rtype: bool
"""
reverse=str(x)[::-1]
print(reverse)
if str(x)==reverse:
return True
return False
Picture this – 3 am in the morning, I had a line of fiends stretched around the corner of my block. It was in the freezing middle of January but they had camped out all night, jumping-ready to buy like there was a sale on Jordans. If you were 16 years old, in my shoes, you’d do anything to survive, right? I got good news though; I MADE IT OUT OF THE HOOD, with nothing but a laptop and an internet connection. I’m not special or lucky in any way. If I, as a convicted felon that used to scream “Free Harlem” around my block until my throat was sore, could find a way to generate a stable, consistent, reliable income online, ANYONE can! If you’re interested in legitimate, stress-free side hustles that can bring in $3,500/week, I set up a site you can use: https://incomecommunity.com