- #1
zeion
- 466
- 1
Homework Statement
Code:
def rev(n):
'''Return the result of reversing the digits in integer n. For example,
rev(512) should return 215.'''
pass
Homework Equations
The Attempt at a Solution
Code:
def rev(n):
'''Return the result of reversing the digits in integer n. For example,
rev(512) should return 215.'''
n = str(n)[-1] + str(n)[:-1]