Bits and bytes?

Guyon Morée gumuz at
Wed Jun 12 10:59:14 EDT 2002

ok, thanx a lot.

there's one thing i am missing though... how do i write '011010110101' as
'binary bits' to a file?

"Christopher Armstrong" <radix at> wrote in message
news:mailman.1023890477.2592.python-list at
>>>>> "Guyon" == Guyon Morée <gumuz at> writes:

    Guyon> ok, this might be a strange question.... but i was wondering: how
    Guyon> can i read or write 'bits'?

    Guyon> if i have a string, how can i convert to it's basic 0's and 1's?

    Guyon> and offcourse, the other way around.... let's say i want to store
    Guyon> some bit-sequence(0011101110) to a file.

    Guyon> how do i do this?

Moshe Zadka wrote this because he was annoyed at all the people in #python
asking how to do this ;-)

                                Chris Armstrong
                         << radix at >>

More information about the Python-list mailing list