convert binary to text in python code example
Example 1: binary to text python
a_binary_string = "01100001 01100010 01100011"
ascii_string = "".join([chr(int(binary, 2)) for binary in a_binary_string.split(" ")])
# ascii_string = "abc"
Example 2: python binary to string
testing = "Satana Blabbers".encode() # string to bytes
# now bytes to string
print(testing.decode(), testing.decode('utf-8')) # both are same