matching one time through a loop

Corey G. ctgaff at attbi.com
Wed May 29 21:53:19 EDT 2002


Break lists one match and exits the program, I tried this earlier.

On Wed, May 29, 2002 at 06:28:15PM -0700, Sean 'Shaleh' Perry wrote:
> 
> On 30-May-2002 Corey G. wrote:
> > I have a script that parses some email from a Maildir directory 
> > and I am looking for the number 550.  I want to stop searching once 
> > the first occurrence is found in order to save time and be efficient.  
> > This sort of thing can be done in Perl using the "last" statement.  
> > I achieved my goal by using a counter but it seems terribly inefficient.  
> > Any ideas?
> > 
> 
> um, 'break'?
> 
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
---end quoted text---

-- 
Best Regards,
Corey





More information about the Python-list mailing list