Strange extra f added to bytes object

Ian Kelly ian.g.kelly at gmail.com
Sun Oct 6 20:44:19 EDT 2013


On Sun, Oct 6, 2013 at 6:39 PM, Joel Goldstick <joel.goldstick at gmail.com> wrote:
>> "f" is the same as \x66; nothing has been changed.
>
> really? I would expect that \x66 = 0110 0110 and f = 1111

The f here is the ASCII character f, not the hex digit f:

>>> bin(ord(b'f'))
'0b1100110'



More information about the Python-list mailing list