S
stephen_b
I'd like to convert a list of floats to formatted strings. The
following example raises a TypeError:
y = 0.5
x = '.1f' % y
following example raises a TypeError:
y = 0.5
x = '.1f' % y
I'd like to convert a list of floats to formatted strings. The
following example raises a TypeError:
y = 0.5
x = '.1f' % y
I'd like to convert a list of floats to formatted strings. The
following example raises a TypeError:
y = 0.5
x = '.1f' % y
You meant:
x = '%.1f' % y
Maybe2009/11/23 stephen_b said:I'd like to convert a list of floats to formatted strings. The
following example raises a TypeError:
y = 0.5
x = '.1f' % y
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.