Please post your code (using the code tags pls ;D). Difficult to debug when we can't see!
Anyway, you need to be clear what type python is using at each point. Using type(whatever) in the command line will give you an idea of whether it's an integer or string or whatever.
You also need to be clear about what, exactly, your conversion is.
Currently, it seems you want to convert:
characters -> 2-digit hex -> multi-digit hex by concatenation -> integer
Your characters start off as a string (I guess).
The 2-digit hex is a string, but the problem is it's sometimes 1-digit hex. So you could even write something explicit like (supposing hs is your hex in a string format):
At the end of this your hs is two digits. You'd need to be careful: is it possible that len(hs)==0 or len(hs)>=3. If so these cases need to be handled.
Good luck, and pls post your code next time if you want more specific help.