
iurisilvio at gmail
Nov 23, 2009, 1:24 PM
Post #3 of 6
(207 views)
Permalink
|
|
Re: Converting a float to a formatted outside of print command
[In reply to]
|
|
You forgot a % simbol in your string: y = 0.5 x = '*%*.1f' % y []s iurisilvio On Mon, Nov 23, 2009 at 7:15 PM, stephen_b <redplusbluemakespurple [at] gmail > wrote: > I'd like to convert a list of floats to formatted strings. The > following example raises a TypeError: > > y = 0.5 > x = '.1f' % y > -- > http://mail.python.org/mailman/listinfo/python-list >
|