> http://www.python.org/doc/current/lib/typesseq-strings.html > >>>> "%.*f" % (2, 2.234234) > '2.23'
Cool! I'd never noticed this, or maybe just difdn't understand the
significance.
And it works for multiple values too:
>>> "%*.*" % (12,3,123.456789)
unfortunately 3 values won't work, it only works for numbers...
>>> "%**.*" % ('-', 12,3,123.456789)
Error...
Alan G
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor
