creating a list from a inconsistent text file

Jetus stevegill7 at gmail.com
Fri May 2 07:14:47 EDT 2008


I have a comma delimited file that is separated by comma's, and then
sometimes by ","

c:\temp\05-06-08\Sale1,659 CECIL,"659 CECIL,40211",
1,659,CECIL,AVENUE,LOUISVILLE,40211,"$65,276.78 "
c:\temp\05-06-08\Sale2,637 SOUTH 27TH,"637 SOUTH 27TH,40211",
2,637,SOUTH 27TH,STREET,LOUISVILLE,40211,"$45,456.95 "
c:\temp\05-06-08\Sale3,2709 ELLIOT,"2709 ELLIOT,40211",
3,2709,ELLIOT,AVENUE,LOUISVILLE,40211,"$49,349.66 "


I would like to pick out data in a particular column. So am I right in
thinking that I would need to covert each line into a list, then
choose the appropriate column via a index?

How do I convert that line into a list?



More information about the Python-list mailing list