Hi,
I'm trying to print two arrays to a file, these are pretty large. However I want to print them as two lists.
This is an example of what my output is now:
[ 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0.
0.66569867 7.74377848 4.73089855 0.30971513 0.03713421 0. 0.
0. 0.19153435 0.18504166 0.35794945 8.43359204
0.11197393 0.10863142 0. 0. 0. 0. 0.
0. 0. 0.04384521 0.29969493 2.69799254
3.45515062 0.1799581 0.17608804 0.28730153 0.54399706
10.58662612 0.18015608 0.1766579 0. 0. 0. 0.
0. 0. 0. 0.04587167 0.12030257
0.19231295 4.23597378 0.08596424 0.28210486 1.18064115
2.91405839 0.33695859 0.33203948 7.46157214 0.32261992
0.1272431 0.02509761 0. 0. 0. 0.03567797
0.18782724 0.37086907 6.61456062 0.09041373 0.11163045 0.
0.01089567 0.02153345 0.02128159 0.11569561 0.7486257
2.49806247 0.32528739 5.76031633 0.35794945 0.18687541
2.83153327 0.09627388 0.07621262 0.16027357 0.24261018
5.31094624 0.1554412 0.06336833]
[ 0.025 0.075 0.125 0.175 0.225 0.275 0.325 0.375 0.425 0.475
0.525 0.575 0.625 0.675 0.725 0.775 0.825 0.875 0.925 0.975
1.025 1.075 1.125 1.175 1.225 1.275 1.325 1.375 1.425 1.475
1.525 1.575 1.625 1.675 1.725 1.775 1.825 1.875 1.925 1.975
2.025 2.075 2.125 2.175 2.225 2.275 2.325 2.375 2.425 2.475
2.525 2.575 2.625 2.675 2.725 2.775 2.825 2.875 2.925 2.975
3.025 3.075 3.125 3.175 3.225 3.275 3.325 3.375 3.425 3.475
3.525 3.575 3.625 3.675 3.725 3.775 3.825 3.875 3.925 3.975
4.025 4.075 4.125 4.175 4.225 4.275 4.325 4.375 4.425 4.475
4.525 4.575 4.625 4.675 4.725 4.775 4.825 4.875 4.925 4.975
5.025]

Two very nasty looking square arrays. I was wondering if I could form them into two lists, seperated by spaces so i could copy them straight into a spreadsheet program and plot one against another?

Wait! I know, I can do it like this:

for index in range(len(nastyarraya)):
            output.write( "%s       %s\n" % (nastyarraya[index], nastyarrayb[index]))
This question has already been answered. Start a new discussion instead.