I have integer number in ex. 16 and i am trying to convert this number to a hex number. I tried to achieve this by using hex function but whenever you provide a integer numb
Are you asking how to convert the string format hexadecimal value '16' into an integer (that is, end up with an integer with decimal value 22)? It's not clear from your question. If so, you probably want int('16', 16)