Reverse Number In Python

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 Reply

Shopping cart