A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/112413.html below:

Simple looping question...

Simple looping question... Simple looping question...Simon Brunning SBrunning at trisystems.co.uk
Mon Apr 2 12:05:16 EDT 2001
> From:	Vincent A. Primavera [SMTP:vincent_a_primavera at netzero.net]
> 	In a piece of code similar to this I am trying to read all the lines
> from a 
> file but no more.  How can I set the "range" of this loop to stop when it 
> reaches the end of the file?
>               
>               for i in range(???):
>               a = fil1.readline()
>               print a
 
See <http://w1.132.telia.com/~u13208596/guides/readline-performance.htm> for
everything that you need to know about reading text files.

Cheers,
Simon Brunning
TriSystems Ltd.
sbrunning at trisystems.co.uk





-----------------------------------------------------------------------
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4