Returns a XOR of all the bytes specified inside of the given list

def checksum_bytes(data):
    """ Returns a XOR of all the bytes specified inside of the given list """

    int_values = [int(x, 16) for x in data]
    int_xor = reduce(lambda x, y: x ^ y, int_values)
    hex_xor = "{:X}".format(int_xor)
    if len(hex_xor) % 2 != 0:
        hex_xor = "0" + hex_xor

    return str.encode(hex_xor)