3
x = "01100001"

How do i convert this string into ASCII

Expected Result:

print(x.somefunction())
Output: a
asked Jan 25, 2017 at 10:27
1

1 Answer 1

4

Use following one liner

x = chr(int('010101010',2))

will work.

answered Jan 25, 2017 at 10:28
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.