On Jul 10, 4:54 pm, Iain King <[EMAIL PROTECTED]> wrote:
> On Jul 10, 2:45 pm, jstrick <[EMAIL PROTECTED]> wrote:
>
> > Here's a simple way to do it with a minimum amount of loopiness (don't
> > forget to use 'try-except' or 'with' in real life):
>
> > f = open("item1.txt")
>
> > for preline in f:
> >     if "Item 1" in preline:
> >         print preline,
> >         for goodline in f:
> >             # could put an end condition with a 'break' here
> >             print goodline,
>
> > f.close()
>
> No

Ignore that
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to