How to get an integer from a sequence of bytes

Steven D'Aprano steve+comp.lang.python at pearwood.info
Mon May 27 20:31:07 EDT 2013


On Mon, 27 May 2013 11:30:18 -0400, Ned Batchelder wrote:

> On 5/27/2013 10:45 AM, Mok-Kong Shen wrote:
>> From an int one can use to_bytes to get its individual bytes, but how
>> can one reconstruct the int from the sequence of bytes?
>>
>>
> The next thing in the docs after int.to_bytes is int.from_bytes:

And I can't believe I missed that too :-(


-- 
Steven



More information about the Python-list mailing list