Creating a conditional iterative list
I have a list B=[0,0,0,0,0,0,0,0,0] but it can be any length.

I am trying to iterate through all possible values I can place in B by iteration. When some condition C is met, I want to "reset" the element I just iterated and bump the next item up by 1. Sort of like binary:

000 becomes 001 but then when we increase to 002, condition C is met so we drop it to 0 and increment the next column: 002 becomes 010, etc.

Sorry if I explained that poorly.

So B might go from 

    B=[0,0,0,0,1,2,5]
    to
    B=[0,0,0,0,1,2,6]
    to
    B=[0,0,0,0,1,2,7]

and so forth.

But when condition C is met, I want to reset in this way:

    B=[0,0,0,0,1,2,96]
    ...attempt to increment
    B=[0,0,0,0,1,2,97]
    ...attempt to increment
    Condition C met
    B=[0,0,0,0,1,3,0]

And be able to do this until I eventually hit condition C on the far left element (equivalent to hitting 1111111 and being unable to increase it any more).

For the sake of easier coding let's say condition C = the sum of all the numbers exceeds 100.
Creating a conditional iterative list
===

I have a list B=[0,0,0,0,0,0,0,0,0] but it can be any length.

I am trying to iterate through all possible values I can place in B by iteration. When some condition C is met, I want to "reset" the element I just iterated and bump the next item up by 1. Sort of like binary:

000 becomes 001 but then when we increase to 002, condition C is met so we drop it to 0 and increment the next column: 002 becomes 010, etc.

Sorry if I explained that poorly.

So B might go from 

    B=[0,0,0,0,1,2,5]
    to
    B=[0,0,0,0,1,2,6]
    to
    B=[0,0,0,0,1,2,7]

and so forth.

But when condition C is met, I want to reset in this way:

    B=[0,0,0,0,1,2,96]
    ...attempt to increment
    B=[0,0,0,0,1,2,97]
    ...attempt to increment
    Condition C met
    B=[0,0,0,0,1,3,0]

And be able to do this until I eventually hit condition C on the far left element (equivalent to hitting 1111111 and being unable to increase it any more).

For the sake of easier coding let's say condition C = the sum of all the numbers exceeds 100.