def xor(bytes1, bytes2):
    """
    Xor two input bytes and return

    Input: `bytes1`, `bytes2`: bytes need to xor.
    Output: xor result
    """
    return bytes([a ^ b for a, b in zip(bytes1, bytes2)])