[Tutor] foreach loops

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Tue Sep 12 04:52:07 CEST 2006



> Does python have foreach loops?  I don't see any mention of them in the 
> docs.  Am I going to have to use Perl (gasp!) if I want my beloved 
> foreach loop?

Can you show an example of a Perl foreach loop?  Perhaps someone can help 
translate it into idiomatic Python.

Good luck!


More information about the Tutor mailing list