How do I convert a hex string to a signed int in Python 3? The best I can come up with is h = '9DA92DAB' b = bytes(h, 'utf-8') ba = binascii.a2b_hex(b) print(int.from_bytes(ba, byteorder='big', signed=True)) Is there a simpler way? Unsigned is so much easier: int(h, 16) BTW, the origin of the question is itunes persistent id - music library xml version and iTunes hex version Continue reading...