Reverse a user-provided number in python

input: 1234
output: 4321

1 Like

n = int(input())
n = str(n)
n1 = “”
for i in n:
n1 = int(n) % 10
n = int(n)/10
print(n1, end=‘’)