СК
Size: a a a
СК
D
СК
СК
D
D
D
СК
>>> hex(n)
'0xaeee73ed'
>>> b = bytearray(4)
>>> b[3] = n & 0xff;
>>> n >>= 8
>>> b[2] = n & 0xff
>>> n >>= 8
>>> b[1] = n & 0xff
>>> n >>= 8
>>> b[0] = n & 0xff
>>>
>>> b
bytearray(b'\xae\xees\xed')
>>>СК
СК
>>> struct.pack("!I", n)
b'\xae\xees\xed'
>>>D
СК
СК
>>> hex(n)
'0xaeee73ed'
>>> b = bytearray(4)
>>> b[3] = n & 0xff;
>>> n >>= 8
>>> b[2] = n & 0xff
>>> n >>= 8
>>> b[1] = n & 0xff
>>> n >>= 8
>>> b[0] = n & 0xff
>>>
>>> b
bytearray(b'\xae\xees\xed')
>>>D
СК
D
СК
D
СК