[Tutor] Readlines

Alan Gauld alan.gauld@blueyonder.co.uk
Wed Jun 25 15:33:02 2003


> Yep. What you start with seems like the more aesthetic, Pythonic
type
> form. And its rather nicer to keep the plain English interpretation
of
> just the two lines. What I'm saying is, well most languages have
this
> FOR command, and they all generally use it to count sequentially,
with
> some options sometimes.


I meant to add that if you want a numerically based for loop in
Python you can usually fake it with:

for index in range(len(foo)):

or to mimic a BASIC or PASCAL style FOR loop:

for i in range(bottom, top):



Alan G