In addition, for and while loops are pretty universally found in all program languages. It is therefore an essential part of material supposed to teach programming.
Adriaan Renting | Email: [EMAIL PROTECTED] ASTRON | Phone: +31 521 595 217 P.O. Box 2 | GSM: +31 6 24 25 17 28 NL-7990 AA Dwingeloo | FAX: +31 521 597 332 The Netherlands | Web: http://www.astron.nl/~renting/ >>> Daniel Dittmar <[EMAIL PROTECTED]> 06/28/05 11:39 AM >>> [EMAIL PROTECTED] wrote: > List comprehensions, however, *are* the basic control flow; loops are > much more verbose and they should be used only when necessary. List comprehensions are probably a bad idea for entry level programmers: - for and while loops are much easier to debug as you can insert print statements everywhere - list comprehensions don't allow you to break complex expressions into several simpler ones by using local variables, everything has to happen in one expression Daniel -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list