Skip to content

Instantly share code, notes, and snippets.

@hxer
Created April 27, 2016 07:46
Show Gist options
  • Save hxer/13cef272756a701478be1499bbd0ab41 to your computer and use it in GitHub Desktop.
Save hxer/13cef272756a701478be1499bbd0ab41 to your computer and use it in GitHub Desktop.
字符串转二进制字符串
''.join([ '{0:08b}'.format(ord(i)) for i in src ])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment