[Tutor] nested loops
Michael M Mason
Michael at shamirlens.co.uk
Mon Feb 7 17:49:59 CET 2011
Alan Gauld wrote:-
> "Wayne Werner" <waynejwerner at gmail.com> wrote
> found = False
> > highscore = 0
> > alignment = somealignment
> > for x in something and not found:
> > for y in somethingelse and not found:
> > for z in evenmoresomething:
> > if x+y+z > highscore:
> > highscore = x+y+z
> > alignment = newalignment
> found = True
> break
>
> HTH,
That's going to exit first time through, isn't it?
--
Michael
This mail was sent via Mail-SeCure System.
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************
More information about the Tutor
mailing list