0

I have the array:

array_h = "'0x5a','0x20','0x29','0x1','0x1','0x59eb5e8e'"

I need to convert it to this:

array_i = [41, 15 ,41, 1, 1, 1508444575]

How can I do it in Python?

River
  • 8,585
  • 14
  • 54
  • 67
Hakyon
  • 9
  • 3

1 Answers1

0

iteratively convert each hexstring to integer:

array_i = []

for eachHexString in array_h:
    array_i.append(int(eachHexString, 16))
Zulfiqaar
  • 603
  • 1
  • 6
  • 12