In 7.1. Fancier Output Formatting I read:
'{:-9} YES votes {:2.2%}'.format(yes_votes, percentage)
But the use of a negative number in the formatting string is not explained here, and the use of the decimal point is left to the reader to infer from the output. In 7.1.2. The String format() Method I read:
This is particularly useful in combination with the built-in function vars(), which returns a dictionary containing all local variables.
As an example, the following lines produce a tidily aligned set of columns giving integers and their squares and cubes:
But this is not an example of using the vars() function or even a dictionary. an example of the use of vars() is needed here. Todd Hoatson Mobile: 763-291-3312 Email: todd_hoatson@sil.org