Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.csv files
#11
here is my code to write to and save .csv file

import csv


f = csv.writer(open("renny's file", "w"))

string = ("Today is the day the Zombies are coming")
f.writerow([string])
print string
Reply
#12
rather cryptic file name
Reply
#13
(Nov-07-2016, 11:09 PM)Blue Dog Wrote:
string = ("Today is the day the Zombies are coming")

If your intention is to have "string" be a tuple, you need more than one element.
>>> s = ("Today")
>>> s
'Today'
>>> s = ("Today", )
>>> s
('Today',)
Reply
#14
just saving a csv file to the top zombie, name renny
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020