This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Write a function intreverse(n) that takes as input a positive integer n and returns the integer obtained by reversing the digits in n. | |
Here are some examples of how your function should work. | |
>>> intreverse(783) | |
387 | |
>>> intreverse(242789) | |
987242 | |
>>> intreverse(3) | |
3 |