Rating: 0

arulselvi@93 – Sept. 1, 2019, 3:51 p.m.

import csv

class Tweet:
def __init__(self, text):
self.text = text

alltweets = [Tweet("But I’ve been talkin' to God for so long that if you look at my life, I guess he talkin' back.")]

outtweets = [ [tweet.text] for tweet in alltweets]

#write the csv
with open('test.csv', 'wt') as f:
writer = csv.writer(f)