I am trying to read strings of processed tweets that I have saved in a csv file in this format :
rt mayasolovely woman complain cleaning house amp man always take trash,momma said pussy cats inside doghouse,addicted2guys simplyaddictedtoguys http co 1jl4hi8zmf woof woof hot scally lad,allaboutmanfeet http co 3gzupfumev woof woof hot soles
Each tweet is separated by a comma and I want to pass them all to a 1d list of strings. I tried the following code:
X_new = []
filename = 'output.csv'
with open(filename, 'r') as f:
reader = csv.reader(f)
for row in reader:
X_new.append(row)
print(X_new)
And the result I get is the following.
[['rt mayasolovely woman complain cleaning house amp man always take trash', 'momma said pussy cats inside doghouse', 'addicted2guys simplyaddictedtoguys http co 1jl4hi8zmf woof woof hot scally lad', 'allaboutmanfeet http co 3gzupfumev woof woof hot soles']]
I don't understand why it gives me a 2d string. I wanted it to be able to return this :
['rt mayasolovely woman complain cleaning house amp man always take trash', 'momma said pussy cats inside doghouse', 'addicted2guys simplyaddictedtoguys http co 1jl4hi8zmf woof woof hot scally lad', 'allaboutmanfeet http co 3gzupfumev woof woof hot soles']
What is going wrong here, thank you in advance!