How to convert byte to floating point number in Python

1 Answer

0 votes
import struct

[fnumber] = struct.unpack('f', b'\xdb\x0fI@')

print(fnumber)



'''
run:

3.1415927410125732

'''

 



answered Jun 7, 2023 by avibootz
...