Hello, The other day I was playing with a while loop with a for loop nested inside.
Within the for loop I had a condition to break the loop, but when loop ran it never existed the loop. I went back and looked in Programming Python to read about loops and I've got two questions (related to each other). Can you run for loops in while loops and if yes, why did my if condition not break the loop? I read that loops sort of have an order of precedence, does that have anything to do with this problem? while True: <do something> for i in items: if i > 10: break else: <do something> -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor