Try this:
s = int(input())
sign = 1
if s < 0:
sign = -1
s = s * -1
rev = str(s)[::-1]
print(sign * int(rev))
solved How to reverse an integer while removing any leading zeroes?
Try this:
s = int(input())
sign = 1
if s < 0:
sign = -1
s = s * -1
rev = str(s)[::-1]
print(sign * int(rev))
solved How to reverse an integer while removing any leading zeroes?