x = "01100001"
How do i convert this string into ASCII
Expected Result:
print(x.somefunction())
Output: a
-
3Did you googled for it? There's already a perfectly good answer on top of my google search: stackoverflow.com/questions/7396849/…fedepad– fedepad2017年01月25日 10:32:21 +00:00Commented Jan 25, 2017 at 10:32
1 Answer 1
Use following one liner
x = chr(int('010101010',2))
will work.
answered Jan 25, 2017 at 10:28
Jay Parikh
2,49119 silver badges13 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
lang-py