How to convert hex string to hex number?

前端 未结 8 1218
孤独总比滥情好
孤独总比滥情好 2020-12-09 17:36

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

8条回答
  •  佛祖请我去吃肉
    2020-12-09 18:05

    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)

提交回复
热议问题