Skip to content

Instantly share code, notes, and snippets.

@xeoron
Forked from agfor/python_conversion.md
Created April 20, 2013 17:30
Show Gist options
  • Save xeoron/5426746 to your computer and use it in GitHub Desktop.
Save xeoron/5426746 to your computer and use it in GitHub Desktop.

Python Number Conversion Chart

From|To|Expression |:-:| 45|"45"|str(data) 45|"101101"| bin(data) 45|"2D"|hex(data) 45|"\x00\x00\x002d"|struct.pack('!i', data) "45"|45|int(data) "45"|"\x00\x00\x002d"|struct.pack('!i', int(data))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment