Skip to content

Instantly share code, notes, and snippets.

@shoya140
Created November 29, 2013 16:37
Show Gist options
  • Save shoya140/7708405 to your computer and use it in GitHub Desktop.
Save shoya140/7708405 to your computer and use it in GitHub Desktop.
num = int(message)
q = []
while num >= 1:
q.append(num - (num/10)*10)
num = num/10
q.reverse()
@shoya140
Copy link
Author

intを一桁ずつlistに変換するためにこんなこと書いたけど
my_list = list(str(my_int))
でよかった。取り出し int(my_list[x])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment