def uniqueInsert(l, v):
    '''
    Add v to list if it is not already there, else raise ValueError
    '''
    if v is not None:
        if v in l:
            raise ValueError('list already contains value %s' % v)
        assert 0 < v < 10, 'Only 1-9 allowed, got %s' % v
        l.append(v)

    Add v to list if it is not already there, else raise ValueError
    
recipes/Python/440542_Sudoku_Solver/recipe-440542.py