[newbie] String to binary conversion

Tobiah toby at tobiah.org
Mon Aug 6 16:59:40 EDT 2012


The binascii module looks like it might have
something for you.  I've never used it.

Tobiah

http://docs.python.org/library/binascii.html

On 08/06/2012 01:46 PM, Mok-Kong Shen wrote:
>
> If I have a string "abcd" then, with 8-bit encoding of each character,
> there is a corresponding 32-bit binary integer. How could I best
> obtain that integer and from that integer backwards again obtain the
> original string? Thanks in advance.
>
> M. K. Shen




More information about the Python-list mailing list