Cutting off trailing zeroes?
Janos Blazi
jblazi at netsurf.de
Sat Jan 29 04:14:10 EST 2000
Id like to format a string like this:
s = "(%f)" % x
Now if x=1.5 then s="1.50000" or something like this. Is there a tirivial
way of cutting of the zeroes, i.e. getting s="1.5" instead of s="1.50000"?
Of course it can be programmed very simply. My question is: can I do it with
specifiers somehow?
Janos Blazi
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
More information about the Python-list
mailing list