举个例子:
i = 0x12345678 print("{:08x}".format(i)) # shows 12345678 i = swap32(i) print("{:08x}".format(i)) # should print 78563412
会是什么swap32-function()?有没有办法int在python中进行字节交换,理想情况下使用内置工具?
swap32-function()
int
python integer endianness
endianness ×1
integer ×1
python ×1