Hi,
I have this cvs file comprising of hex values. But my objective is to have them all converted to normal base 10 Dec format.
myfile.csv
0x0000004d,0x00005275,0x37106800,0x000008a2,0x000009a2
0x0000004d,0x00005275,0x370d4e00,0x000008a2,0x000009a2
0x0000004d,0x00005275,0x37106800,0x000008a2,0x000009a2
0x0000004d,0x00005275,0x370d4e00,0x000008a2,0x000009a2
I tried
for line in open('myfile.csv'):
for word in line:
word = int(word,16)
word = int(word,16)
ValueError: invalid literal for int() with base 16: 'x'
How can I get around this?