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?

1 Answer 1

4

Something like this?

>>> s = "104,101,108,108,111"
>>> "".join(chr(int(number)) for number in s.split(","))
'hello'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.