hex string to character in python

后端 未结 4 1184
心在旅途
心在旅途 2021-01-01 20:37

I have a hex string like:

data = \"437c2123\"

I want to convert this string to a sequence of characters according to the ASCII table. The

4条回答
  •  孤城傲影
    2021-01-01 20:39

    The ord function converts characters to numerical values and the chr function does the inverse. So to convert 97 to "a", do ord(97)

提交回复
热议问题