'How can I convert Ascii into binary length 7?
How can I convert Ascii into binary length 7 this is what i have so far:
f = open("two_cities_ascii.txt")
lines = f.read()
byte_array = lines.encode()
binary_int = int.from_bytes(byte_array, "big")
binary_string = bin(binary_int)
print(binary_string)
f.close
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
