Skip to content

Instantly share code, notes, and snippets.

@micronax
Created December 13, 2012 18:11
Show Gist options
  • Save micronax/4278405 to your computer and use it in GitHub Desktop.
Save micronax/4278405 to your computer and use it in GitHub Desktop.
Shorthand convert char to binary in python
binary = ''.join(['%08d'%int(bin(ord(s))[2:]) for s in ascii_input])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment