How to write string (float) to file?
Rainer Deyke
root at rainerdeyke.com
Wed Aug 29 13:36:44 EDT 2001
"Grant Edwards" <grante at visi.com> wrote in message
news:slrn9oq892.96i.grante at isis.visi.com...
> The OP stated that float(a)/b was fine, and he wanted a way to format the
FP
> result of that expression. The OP was told he could use "%.2f" to format
> his results. That's the simplest way to do what he asked, and AFAICT it
> produces correct results.
>
> You seem to be telling the OP that he's wrong, float(a)/b isn't good
enough,
> and he shouldn't be using floating point?
That is essentially what I was saying. I read the OP's question as "How do
I calculate a/b accurately to two decimal places?", and that's the question
I answered.
--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games - http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
More information about the Python-list
mailing list