I have an csv file that looks like
a
b
c
d
e
and a code that looks like
import csv
def func():
with open('zumatchende.csv', mode='r') as csv_datei:
csv_datei=csv.DictReader(csv_datei, delimiter=";", dialect="excel")
for row in csv_datei:
print(row)
func()
i would have expected an output like
['a']
['b']
['c']
['d']
['e']
but i get
{'a':'b'}
{'a':'c'}
{'a':'d'}
{'a':'e'}
i used this often times before and i always got the row back as an array with each element of the row as one element of the array. I dont understand why this is now formated in another data type and even puts together 2 lines into one. How can i fix this? Or what am I doing wrong? The code that i used in other places which works fine looks the same, exept the file name.