def xor_bytes(a: bytes, b: bytes) -> bytes:
return bytes([x ^ y for x, y in zip(a, b)])
def print_bitset_array(label: str, array: bytes) -> None:
print(f"{label}:", end=" ")
for b in array:
print(f"{b:08b}", end=" ")
print()
# b"Aeryn" = a variable a as a bytes object.
# The prefix b indicates that "Aeryn" is stored as raw bytes.
a = b"Aeryn"
b = b"Albus"
c = xor_bytes(a, b)
print_bitset_array("a", a)
print_bitset_array("b", b)
print_bitset_array("c", c)
print("c:", end=" ")
for byte in c:
print(byte, end=" ")
print()
'''
run:
a: 01000001 01100101 01110010 01111001 01101110
b: 01000001 01101100 01100010 01110101 01110011
c: 00000000 00001001 00010000 00001100 00011101
c: 0 9 16 12 29
'''