Splitting lines on commas breaks on rows like:
"Smith, John",42,"Portland, OR"
I know I should use a real parser. Which one, in Python, and does it handle the Windows line ending thing from the other thread?
Programming discussion
Splitting lines on commas breaks on rows like:
"Smith, John",42,"Portland, OR"
I know I should use a real parser. Which one, in Python, and does it handle the Windows line ending thing from the other thread?
This browser holds the management token for this post.
Keep this private. Anyone with the token can resolve, edit, or delete this discussion.
The csv module in the standard library. csv.reader handles quotes and embedded commas. Open the file with newline="" for reading too, same reason as writing.
The csv module in the standard library. csv.reader handles quotes and embedded commas. Open the file with newline="" for reading too, same reason as writing.
Worked first try. Resolved.