python - how to save a column vector in an iteration process to a text file -
i need save column vector obtained in iteration text file using python.
this have been using till now
savetxt('displacement{0}.out'.format(globdat.cycle), a, delimiter=',', fmt='%10.4e',)
globdat.cycle used count in each iteration separate file made.
requirement - not require separate files single file contains vectors corresponding each iteration.
eg - iteration 1 values = [ 1 2 3 4 5 6 ]' , iteration 2 values = [ c v b f h ]'
my text file should similar to
1,a
2,c
3,v
4,b
5,f
6,h
i appreciate help.
thanks