I have some data in an array with 5 columns and a lot of rows.
I want to save this in a txt file by doing:
for i in range(rows):
with open ('datos_practica.txt','a') as f:
line=str(data[i,:])
f.write(line)
f.write('\n')
But instead of getting printing 5 columns in the txt file:
00 01 02 03 04
and so on........
It writes the last column below the first one
00 01 02 03
04
and so on....
Any clues for this issue? Thanks in advance.
dataandrowsor just two lines ofdata.