Skip to content

Instantly share code, notes, and snippets.

@marimiyapriv
Created October 25, 2015 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marimiyapriv/209cc1d5f53e38eb777a to your computer and use it in GitHub Desktop.
Save marimiyapriv/209cc1d5f53e38eb777a to your computer and use it in GitHub Desktop.
数字の逆並び
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