Let's say I have two given hex values which are str as datatype:
a = 0x15
b = 0x18
Now I would like to append them so that I have as result:
0x1518
The normal way would be to cast the values to int to be able to append, like:
(hex( (int(a)<<8) | int(b) ))
I'm getting the error:
ValueError:invalid literal for int() with base 10: '0x15'
What I'm doing wrong here?