Created
October 25, 2015 15:40
-
-
Save marimiyapriv/209cc1d5f53e38eb777a to your computer and use it in GitHub Desktop.
数字の逆並び
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
num = 12452 | |
print num | |
print str(num)[::-1] | |
## 2進数の場合 | |
print bin(num).split("0b")[1] | |
print bin(num).split("0b")[1][::-1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment