Why Tea wrote: > print format % values > An optional minimum width of the conversion, specified using one or > more digits or an asterisk (*), which means that the width is taken > from the next item in values > > That's from one of O'reilly's books. But there is no example and I > couldn't get it to work by trials and errors. Does anyone have a > working example? > > /Why Tea > > value = 3.141592654 print "%1.3f" % value
there you go :) look at printf in c for general ideas about the format specifiers -- http://mail.python.org/mailman/listinfo/python-list