Reverse Number In Python

Share on facebook
Share on twitter
Share on linkedin
Share on twitter
Share on tumblr

In this python program, we will have look at how to reverse number in python.

Python program to reverse a number

Number = int(input("Enter a number: "))    
Reverse = 0    
while(Number > 0):    
    Reminder = Number %10    
    Reverse = (Reverse *10) + Reminder    
    Number = Number //10    
print("\n Reverse of entered number is = %d" %Reverse)    

Leave a Comment

Your email address will not be published. Required fields are marked *