I have been trying to convert a hexadecimal string into a hexadecimal value in Python just as you can convert a string containing an integer into an integer value. I have tried the following
>>> a = '0x25'
>>> b = hex(a)
Traceback (most recent call last):
File "<pyshell#47>", line 1, in <module>
b=hex(a)
TypeError: hex() argument can't be converted to hex
and
>>> b = '20'
>>> int(b)
20
but I haven't reached any viable solution.