标签:nbsp 大小端 大小 color sign point 方法 ati pre
>>> import sys
>>>
>>> sys.byteorder
‘little‘
>>>
| Type code C Type Minimum size in bytes
| ‘b‘ signed integer 1
| ‘B‘ unsigned integer 1
| ‘u‘ Unicode character 2 (see note)
| ‘h‘ signed integer 2
| ‘H‘ unsigned integer 2
| ‘i‘ signed integer 2
| ‘I‘ unsigned integer 2
| ‘l‘ signed integer 4
| ‘L‘ unsigned integer 4
| ‘q‘ signed integer 8 (see note)
| ‘Q‘ unsigned integer 8 (see note)
| ‘f‘ floating point 4
| ‘d‘ floating point 8
>>> import array
>>> a = array.array(‘l‘,[1])
>>>
>>> bytes(a)
b‘\x01\x00\x00\x00‘
>>>
>>> a = array.array(‘l‘,[255])
>>> bytes(a)
b‘\xff\x00\x00\x00‘
>>>
>>>
>>> a = array.array(‘l‘,[65535])
>>>
>>> bytes(a)
b‘\xff\xff\x00\x00‘
>>>
>>>
低位在低地址内保存,本机使用的是小端模式。
标签:nbsp 大小端 大小 color sign point 方法 ati pre
原文地址:https://www.cnblogs.com/frisk/p/11616149.html