Код: Выделить всё
>>>print(len(b'\x00\x00'))
>>>2
>>># Although it should be 0
>>>print(len(b'\x00\x00\x00\x00\x00\x00\x00\x00'))
>>>8
>>># Although it should be 0
Код: Выделить всё
>>>print(int.from_bytes(b'\x00\x00'))
>>>0
>>># Although it should be 0
>>>print(int.from_bytes(b'\x00\x00\x00\x00\x00\x00\x00\x00'))
>>>0
>>># Although it should be 0
Подробнее здесь: https://stackoverflow.com/questions/787 ... -incorrect