Converting a Binary

Warren Postma embed at geocities.com
Tue May 9 18:46:38 CEST 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