solution2
if x < 0:
return False
rev_x = 0
m = x
while m>0:
rev_x = rev_x*10 +m%10
m = m//10
return rev_x == x
solution1
a = []
index = x
if x < 0:
return False
while x > 9:
a.append(x%10)
x = x//10
print(x)
a.append(x)
print(a)
for j in range(0,int(0.5*len(a))):
if a[j] != a[-1-j]:
return False
print(a[j],a[-1-j])
return True