"Kent Johnson" <[EMAIL PROTECTED]> wrote in message >> One final tip is to put the format string in a variable then use >> that >> in printing/writing the output ... >> This has the advantage that you can build the format string >> dynamically by examining the data first - eg the maximum >> length of an entry.
> You don't need to build the format string dynamically to get control > of > the maximum width. A neat trick is that if you use '*' for the > format > width, the width will be read from the parameter list: Good point, I usually forget that one... However predefined format strings have other advantages too - consistency for one thing. You can write output in multiple places and be sure the format is consistent throughout. Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor