On Tue, Apr 23, 2013 at 2:58 PM, Ana Dionísio <anadionisio...@gmail.com>wrote:

> Thank you, but can you explain it a little better? I am just starting in
> python and I don't think I understood how to apply your awnser
> --
> http://mail.python.org/mailman/listinfo/python-list
>

#!/usr/local/pypy-1.9/bin/pypy

import csv

def main():
    with open('test.csv', 'r') as file_:
        for row in csv.reader(file_, delimiter="|"):
            print row

main()

# Example input:
# abc|def|ghi
# jkl|mno|pqr

In this way, you get one row at a time, instead of all rows at once.

HTH
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to