1

I have a bunch of numbers in a string array and I feel like they are bunch of bytes.

I wonder how I can convert those numbers into an actual string representation. I guess I need to convert this string array to a byte array and later I can decode this byte array to string.

Any help?

4

1 回答 1

4

像这样的东西?

>>> s = "104,101,108,108,111"
>>> "".join(chr(int(number)) for number in s.split(","))
'hello'
于 2014-01-21T21:43:50.360 回答