I have a string in Python which represents a hex val
my_hex_str = "000004fc"
How do I convert it into an int ? 04fc = 1276 in DEC
Tried
my_dec = int(my_hex_str)
But did not work, it gives me
ValueError: invalid literal for int() with base 10: '000004fc'
Specify the base:
>>> int("000004fc", 16)
1276