Use csv.writer().writerows() rather than explicitly looping through with writerow()
This commit is contained in:
parent
f83c69f902
commit
6a1cce1b97
1 changed files with 1 additions and 2 deletions
|
@ -74,8 +74,7 @@ def getTweetsByDate(strings = [], path = tools.config.dbpath, fr = "", to = ""):
|
||||||
tweets = db.executeQuery(queryBuilder(strings,fr,to))
|
tweets = db.executeQuery(queryBuilder(strings,fr,to))
|
||||||
writer = csv.writer(sys.stdout)
|
writer = csv.writer(sys.stdout)
|
||||||
|
|
||||||
for day in tweets:
|
writer.writerows(tweets)
|
||||||
writer.writerow(day)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
strings, fr, to = dateArgs()
|
strings, fr, to = dateArgs()
|
||||||
|
|
Loading…
Reference in a new issue