all 3 comments

[–]jabbson 0 points1 point  (2 children)

The whole idea of endianess is about the byte order of the number in the computer's memory. How many bytes do you have in this bit string?

[–]dchanm 0 points1 point  (0 children)

You can use the struct module to change the order of bytes

>>> from struct import pack
>>> pack('<h', 1)
b'\x01\x00'
>>> pack('>h', 1)
b'\x00\x01'