I have a input JSON file which include data with String like "Address": "0x33". I would like to use this data to open my raw data file and seek to the file location.
infile.seek(0x30,0)
How could I convert the input data to a hex value and let my seeking address flexiable?
address="0x30"
infile.seek(address,0)
How to convert string "0x30" to a hex value 0x30?
0x30 == 48int(address, 16)?0x. The answer can be found at the dupe. Follow the link for enlightenment.int('deadbeef', 16) == int('0xdeadbeef', 16)evaluates toTruein both python 2.7.6 and python 3.4.0 on my machine.