请问大家我的代码里面 写入的数值是23.45,为什么输出的会是23.450000762939453呀
下面是代码:
import struct
a = 23.45
bytes = struct.pack('f',a)
file = open('1234','wb')
file.write(bytes)
file.close()
file = open('1234','rb')
bytes = file.read()
a,= struct.unpack('f',bytes)
print(a)