Write a Python Program to print the Reverse a Given Number


Topic: Write a Python Program to print the Reverse a Given Number

Solution

n=1023
rev=0
while(n>0):
    dig=n%10
    rev=rev*10+dig
    n=n//10
print("Reverse of the number:",rev)



List all Python Programs