I think the best way to express my question is by showing an example:
I have a hex number, say 2f. I want to take this hex number and put a ‘9’ in the fifth place, followed by zero’s. So in this case I want 9002f. From here I will do convert this back to decimal.
I was thinking the best way to do this is by using lists and having a list of ['9','0','0','0','0'] and a list of ['2','f'] and somehow overwriting to the 9000 list.
What do you guys think?
Why do the string manipulation at all? It sounds like you want to do math with hex numbers:
If you really need to get the string, you can then turn it back into a string: