More on strings – formatting
•
printf()-style formatting, using %-operator
•
format_string % value_tuple
>>> “%5.2f and %3.3i” % (17.421,
12)
“17.42 and 012”
Format codes:
%f %g %e
floating points
%i %d
integers
%s
force string representaion