How to convert int list (0–255) to float in Python

1 Answer

0 votes
import struct

byte_list = [0x41, 0x20, 0x00, 0x00]
data = bytes(byte_list)

value = struct.unpack('<f', data)[0] # Little‑endian
print(value)


'''
run:

1.1570521419930015e-41

'''

 



answered May 5 by avibootz
...