How to convert
x = "0x000000001" # hex number string
to
y = "1"
You can do:
y = int("0x000000001", 16)
in your case:
y = int(x, 16)
Looks like you want the int converted to string:
y = str(int(x, 16))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With