How to convert hexadecimal string to character with that code point?

前端 未结 3 1733
灰色年华
灰色年华 2021-01-19 04:07

I have the string x = \'0x32\' and would like to turn it into y = \'\\x32\'.
Note that len(x) == 4 and len(y) == 1.

3条回答
提交回复
热议问题