Perfect! It works. Thanks Bruno.
Bruno Desthuilliers wrote:
> bei a écrit :
> Please don't top-post
>
> > Hi,Simon,
> >
> > Thanks for your reply.It's very helpful :)
> > But I am sorry for my given example.Actually, my data in the arrays are
> > all float point datas.And I use integer in the exam
bei a écrit :
Please don't top-post
> Hi,Simon,
>
> Thanks for your reply.It's very helpful :)
> But I am sorry for my given example.Actually, my data in the arrays are
> all float point datas.And I use integer in the example.The code is like
> this.
> ("x,v,...,h" are floating point number arra
Hi,Simon,
Thanks for your reply.It's very helpful :)
But I am sorry for my given example.Actually, my data in the arrays are
all float point datas.And I use integer in the example.The code is like
this.
("x,v,...,h" are floating point number arrays)
pos=str(x)
vel=str(v)
ene=str(u)
den=str(rho)
p
bei wrote:
> Hi,
>
> I am trying to write several arrays into one file, with one arrays in
> one column. Each array (column) is seperated by space.
> ie. a=[1,2,3, 4] b=[5,6,7,8] c=[9,10,11,12]
> 1 5 9
> 2 6 10
> 3 7 11
> 4 8 12
>
> Now I use the function file.writelines(a), file.writelines
Hi,
I am trying to write several arrays into one file, with one arrays in
one column. Each array (column) is seperated by space.
ie. a=[1,2,3, 4] b=[5,6,7,8] c=[9,10,11,12]
1 5 9
2 6 10
3 7 11
4 8 12
Now I use the function file.writelines(a), file.writelines(b),
file.writelines(c). And th