Converting a Binary

Warren Postma embed at geocities.com
Tue May 9 12:46:38 EDT 2000


>
> struct.pack( 'i', yourinteger )
>
> Enjoy,
> Mike

Interesting how ambiguous "convert to binary is". I assumed he meant "print
an integer variable as a base-2 (binary) string representation". ;-)

Warren





More information about the Python-list mailing list