I am writing some data in a file using a "for" loop. I am running same code in my computer and in cluster. In my computer, data is being written for each loop while in cluster data is only written after the whole loop is finished. So, file size is increasing gradually in my computer while in cluster it remain zero until the whole loop is over. What could be the reasons?
sample code is:
file1=open("data.dat", "w")
for i in range(10000):
file1.write('{0}\t {1}\n'.format(x[i], y[i]))
file1.close()