Created
March 6, 2015 15:29
-
-
Save fabiocerqueira/0a96714e786c437d7704 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| def int2list(n): | |
| out = [] | |
| while n: | |
| n, r = divmod(n, 10) | |
| out.insert(0, r) | |
| return out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment