Wie wandle ich in Python3 float in hex um?
hex(0.5) liefert ein Error.
float to hex
Funktioniert leider nichtlunar hat geschrieben:Code: Alles auswählen
struct.pack('!d', 0.5).encode('hex')
Code: Alles auswählen
AttributeError: 'bytes' object has no attribute 'encode'