Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

from_bytes python

>>> int.from_bytes(b'x00x10', byteorder='big')
16
>>> int.from_bytes(b'x00x10', byteorder='little')
4096
>>> int.from_bytes(b'xfcx00', byteorder='big', signed=True)
-1024
>>> int.from_bytes(b'xfcx00', byteorder='big', signed=False)
64512
>>> int.from_bytes([255, 0, 0], byteorder='big')
16711680
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #python
ADD COMMENT
Topic
Name
8+1 =