Formatted numerical output

Mark stock4069 at yahoo.com
Sat Nov 27 22:18:29 EST 2004


How do I output formatted numerical data to an external (text) file. At 
a minimum I want to specify the number of decimal places to print. 
Ideally I'd like the type of control the fortran FORMAT statement 
offers. I'm sure this is easy, but I can't seem to find the answer!

I want an output file to look like this:

0.1   0.8575
0.2  12.0900
0.4 345.0000
0.5   9.0002

etc.

Thanks,

Mark



More information about the Python-list mailing list