The enumerate function should allow you to check whether you are in the
first iteration.

Like so:

      for row_number, row in enumerate(csv.reader(<...>)):
          if enumerate == 0:
              if <your check...>:
                  break
          ...

Enumerate allows you to know how far into the iteration you are.

You could use the iterator's next() method too.

On 23 Apr 2013 23:53, "Ana Dionísio" <anadionisio...@gmail.com> wrote:
>
> The condition I want to meet is in the first column, so is there a way to
read only the first column and if the condition is true, print the rest?
> --
> http://mail.python.org/mailman/listinfo/python-list
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to