import struct import sys print(hex(int(sys.argv[1][2:], 16))) bytes_ = struct.pack("d", bytes_)[0])