Saturday, March 2, 2019

Reverse Number - Python3

a=int(input("Enter the number:"))
b=0
while a>0:
        temp=a%10
        b=b*10+temp
        a=a//10
print("Reverse:",b)        

ScreenShot:

No comments:

Post a Comment