On May 20, 1:34 pm, [EMAIL PROTECTED] wrote:
> i have a big file with sentences, the first file of each sentence
> contains a colon(:) somewher eon that line
> i want to jump past that sentence.
>
> if all(x != ':' for x in line):
>
> this way i  can check but i dont want to check for every line in the
> whole file, quite unnecessary when i only need to
> chekc the first line.
>
> so the question is, when dealign with iterators like:
> mov = open(afile)
> for line in mov:
>         do y
>
> how do i jump the first step there? i dont want to iterate the first
> row...how do i start at the second?

How about this?

mov = open(afile)
first = mov.next()
# check first for ':' and do whatever you need to do
# including the 'y' processing from below if required
for line in mov:
        do y

...
Jay Graves
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to