May-07-2018, 12:23 PM
Using struct should do it.
>>> import struct >>> >>> b = bytearray(b'B\xc8\x00\x00') >>> b bytearray(b'B\xc8\x00\x00') >>> f = struct.unpack('>f', b) >>> f (100.0,) >>> f[0] 100.0 >>> type(f[0]) <class 'float'>