From 6a1cce1b97bbe364c45ac7b37d336fa4b21b5a26 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Fri, 24 Apr 2015 23:05:39 +0200 Subject: [PATCH] Use csv.writer().writerows() rather than explicitly looping through with writerow() --- datecsv.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datecsv.py b/datecsv.py index 93530c7..303c5e8 100755 --- a/datecsv.py +++ b/datecsv.py @@ -74,8 +74,7 @@ def getTweetsByDate(strings = [], path = tools.config.dbpath, fr = "", to = ""): tweets = db.executeQuery(queryBuilder(strings,fr,to)) writer = csv.writer(sys.stdout) - for day in tweets: - writer.writerow(day) + writer.writerows(tweets) if __name__ == "__main__": strings, fr, to = dateArgs()