• + 0 comments

    not sure why, but when I run your code as it is I get an error: if((y)<=len(list)): list[y] -= incr; IndexError: list index out of range

    but when I do run that line like this:

    if((y)<=len(list)): list[y-1] -= incr;

    that works