While stack:

Chris Angelico rosuav at gmail.com
Fri Jun 1 15:08:39 EDT 2012


On Sat, Jun 2, 2012 at 3:59 AM, David Shi <davidgshi at yahoo.co.uk> wrote:
> Can any one clarify what "while stack:" mean?

It iterates as long as 'stack' has something that evaluates as true.
My guess is that stack is a list, and the loop is removing elements
from that list, so it'll keep going as long as there's anything in it.

ChrisA



More information about the Python-list mailing list