How do i convert a string of ascii values to there original character/number in python

前提是你 提交于 2019-12-04 07:06:27

问题


i have a string with numbers that i previously converted with my encoder but now i am trying to decode it ive searched around and no answers seem to work if you have any i dear how to do this then let me know

string = 91 39 65 97 66 98 67 99 32 49 50 51 39 93

outcome = ABCabc 123


回答1:


outcome = "".join([your_decoder.decode(x) for x in string.split(" ")])


来源:https://stackoverflow.com/questions/34899602/how-do-i-convert-a-string-of-ascii-values-to-there-original-character-number-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!