+ 1
what is the logic for reverse a number in python??
2 Answers
+ 3
https://www.sololearn.com/post/10621/?ref=app
print(list(reversed("123")))
might help
else use a normal loop
+ 3
Another way:
n = 123
s = str(n)
rev = s[::-1]
n_rev = int(rev)
# n_rev == 321