First time here? Check out the FAQ!
answered 2012-03-01 12:57:23 +0100
Does this StackOverflow queston on repeated function application solve your problem?
Python's while/yield generator syntax might also be useful for this.
while
yield