2

I would like to perform an XOR between two arrays of bytes declared as:

a = bytes([0x01, 0x02, 0x04, 0x08])
b = bytes([0x55, 0x55, 0x55, 0x55])

I already tried a ^ b, but I've got the following error:

unsupported operand type(s) for ^: 'bytes' and 'bytes'

What is the most conscice way to perform the XOR operation?

Geektonik
  • 31
  • 3

0 Answers0