"Dan Bishop" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Oct 24, 8:56 pm, "Junior" <[EMAIL PROTECTED]> wrote: >> I want to open a text file for reading and delineate it by comma. I also >> want any data >> surrounded by quotation marks that has a comma in it, not to count the >> commas inside the >> quotation marks > > Use the csv module. Thanks for the help! I used the csv module to write this;
import csv reader = csv.reader(open('testfile.txt', "rb")) for row in reader: print "var2= ", row[2] The reason I didn't use the csv module is because I read this book to learn Python, Python Programming for the Absolute Beginner, Second Edition (For the Absolute Beginner) by Michael Dawson (Author), and it did not mention the csv module it just explained how to import modules. I also read the tutorial that comes with python but it ends with the History and License section. Can you recommend a book that explains the most used modules? -- http://mail.python.org/mailman/listinfo/python-list