while En vanlig enkel förtestad loop: x = 1 while x < 10: print "Nu är talet", x x = x + 1 Använd break för att hoppa ut i förtid Använd continue för att direkt gå tillbaka till testet while obj.not_done(): x = obj.get_value() if x < 0: break # Must stop now process1(x) if x > 10: continue # Done for this value process2(x) ...