How to write a Python program to read a number from the user and print the reversed number

Hello readers in this article I will show you how to write a Python program to read a number from the user and print the reversed number so let’s get started.

n=int(input("Please Enter any number"))
while (n!=0):
    rem=n%10
    q=n
    n=q
    print(rem,end="")

Output

Please Enter any number 567
765

So as you can see this small program helps you to read a number from the user and print the reversed it.

Thank you