Skip to content

Instantly share code, notes, and snippets.

@fabiocerqueira
Created March 6, 2015 15:29
Show Gist options
  • Select an option

  • Save fabiocerqueira/0a96714e786c437d7704 to your computer and use it in GitHub Desktop.

Select an option

Save fabiocerqueira/0a96714e786c437d7704 to your computer and use it in GitHub Desktop.
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