Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # bin to char
- string = """01001001 01100110 00100000 01111001 01101111 01110101 00100000 01100011 01100001 01101110 00100000 01110010 01100101 01100001 0110010
- ...: 0 00100000 01110100 01101000 01101001 01110011 00100000 01111001 01101111 01110101 00100000 01100001 01110010 01100101 00100000 01100001 001
- ...: 00000 01100110 01110101 01100011 01101011 01100101 01100100 00100000 01101110 01100101 01110010 01100100"""
- "".join([chr(int(c,2)) for c in string.split(" ")])
- # char to bin
- string = "0b1001110 0b1101111 0b1101111 0b1101111 0b101100 0b100000 0b1001001 0b100111 0b1101101 0b100000 0b1101110 0
- ...: b1101111 0b1110100"
- " ".join([bin(ord(c)) for c in string])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement