Robot framework tutorial, Selenium, Python, Jmeter, Automation notes
Saturday, February 14, 2015
Python: Reverse order of a number
Reverse order of a number
def reverse(n):
total = ""
while n > 0:
a = n % 10
n//= 10
total += str(a)
return total
print reverse(144)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment