3
x = "01100001"

How do i convert this string into ASCII

Expected Result:

print(x.somefunction())
Output: a
1

1 Answer 1

4

Use following one liner

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

will work.

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.