Created
December 2, 2017 15:57
-
-
Save rchamarthi/ff4fc57fe3c6546b515d2c5ea4800a4f to your computer and use it in GitHub Desktop.
string to csv write python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
row = 'abc,xyz'.split(',') | |
print(row) | |
with open('eggs.csv','w') as csvfile: | |
spamwriter = csv.writer(csvfile, delimiter='|', | |
quotechar='"', quoting=csv.QUOTE_MINIMAL) | |
spamwriter.writerow(row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment