Created
November 29, 2013 16:37
-
-
Save shoya140/7708405 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
num = int(message) | |
q = [] | |
while num >= 1: | |
q.append(num - (num/10)*10) | |
num = num/10 | |
q.reverse() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
intを一桁ずつlistに変換するためにこんなこと書いたけど
my_list = list(str(my_int))
でよかった。取り出し int(my_list[x])