def update(list):
    '''This function updates list based on rule ( left XOR right here )'''
    temp = len(list)*[0]
    n = len(list)
    for i in range(1,n-1):
        temp[i] = list[i-1]^list[i+1]  # list[i] = list[i-1] XOR list[i+1
    return temp
This function updates list based on rule ( left XOR right here )
recipes/Python/576539_Simple_Cellular_Automata_/recipe-576539.py