i am working with a csv file in python and just discovered that after i open it like this : with open("randomfile.csv", "r") as csvfile, i can read contents in two ways :
#1
Content1 = next(csvfile)`
#2
csvreader = csv.reader(csvfile)
Content2 = next(csvreader)
but the type of Content1 is a string whereas the type of Content2 is a list, anyone knows why ?
EDIT : Turns out if you write
csvreader = csv.reader(csvfile)
Then writing
Content1 = next(csvfile)
will now output a list too