>>> import struct>>> struct.pack('f', 3.141592654)b'xdbx0fI@'>>> struct.unpack('f', b'xdbx0fI@')(3.1415927410125732,)>>> struct.pack('4f', 1.0, 2.0, 3.0, 4.0)'x00x00x80?x00x00x00@x00x00@@x00x00x80@'
>>> import struct>>> struct.pack('f', 3.141592654)b'xdbx0fI@'>>> struct.unpack('f', b'xdbx0fI@')(3.1415927410125732,)>>> struct.pack('4f', 1.0, 2.0, 3.0, 4.0)'x00x00x80?x00x00x00@x00x00@@x00x00x80@'