I'm facing a strange issue related to copying array elements inside other arrays, let me explain with a code:
I'm loading a csv into a bidimensional array, if I do something like this:
e = [None] * 4
with open("file.csv") as f:
for line in f:
e=line.split(",")
finalarray.append(e)
If I do this, in finalarray I got only the last csv entry repeated all the time, but, if I do this:
with open("file.csv") as f:
for line in f:
finalarray.append(line.split(","))
works like a charm, but I cannot undestand why the second option works and the first one fails loading always the last csv entry.
Kind regards, and thanks in advance.