import functools


def odd_occurrence_xor(arr):    
    """
    
    Reduce the list by using the XOR operator.
    We pass through the list once, and store only one value.
    Space complexity: $O(1)$; Time complexity: $O(n)$.

    Parameters
    ----------
    arr : integer

    Returns
    -------
    integer

    """
    return functools.reduce(lambda x,y: x^y, arr)