converting decimal to binary

Paul Rubin http
Fri May 23 20:58:20 EDT 2003


"Michael P. Soulier" <msoulier at storm.ca._nospam> writes:
> main::(-e:1):   0
>   DB<1> p unpack("B*", pack("C", 192))
> 11000000
> 
>     Is there a similar way to do this in Python?

See the struct module.




More information about the Python-list mailing list