Reading file bit by bit

superpollo utente at esempio.net
Mon Jun 7 08:07:05 EDT 2010


Ulrich Eckhardt ha scritto:
> Peter Otten wrote:
>> Ulrich Eckhardt wrote:
>>> Says Python:
>>>
>>>>>> bin(192)
>>> '0x11000000'
>> Hmm, if that's what /your/ Python says, here's mine to counter:
>>
>>>>> bin(192)
>> '0_totally_faked_binary_00000011'
> 
> Argh! Of course one of my Pythons says '0b11000000' and not what I mistyped
> above.... =(

mine goes like this:

 >>> bin(192)
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
NameError: name 'bin' is not defined




More information about the Python-list mailing list