#coding=utf-8
from struct import pack,unpack

byte=pack('f',1.5)
print(byte)
print([i for i in byte])

byte=pack('f',123432.523424)
print(byte)
print([i for i in byte])

输出

??
['\x00', '\x00', '\xc0', '?']
C?G
['C', '\x14', '\xf1', 'G']

 

相关文章:

  • 2022-12-23
  • 2021-07-11
  • 2022-02-11
  • 2021-08-04
  • 2022-12-23
  • 2021-07-24
  • 2021-05-26
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2021-10-29
  • 2022-12-23
相关资源
相似解决方案