I know that when I use
* and the actual width will be read from the next element of the tuple of values, and the value to convert will be the one following:
>>> "%*d" % (2, 1) ' 1'
This is documented in the String Formatting Operations section of the documentation — it says:
- Minimum field width (optional). If specified as an
'*'(asterisk), the actual width is read from the next element of the tuple in values, and the object to convert comes after the minimum field width and optional precision.