On Feb 21, 7:11 pm, TomF <tomf.sess...@gmail.com> wrote: > On 2010-02-21 09:53:45 -0800, vsoler <vicente.so...@gmail.com> said: > > > I'm trying to print .7 as 70% > > I've tried: > > > print format(.7,'%%') > > .7.format('%%') > > > but neither works. I don't know what the syntax is... > >>> print "Grade is {0:%}".format(.87) > > Grade is 87.000000% > > or if you want to suppress those trailing zeroes: > > >>> print "Grade is {0:.0%}".format(.87) > > Grade is 87%
Excellent, works perfect!!! -- http://mail.python.org/mailman/listinfo/python-list