You can repeat the formatting string itself:
print ('{:5d} '*5).format(*values)
Format string is a normal string, so you can multiply it by int
>>> '{:5d} '*5
'{:5d} {:5d} {:5d} {:5d} {:5d} '
You can repeat the formatting string itself:
print ('{:5d} '*5).format(*values)
Format string is a normal string, so you can multiply it by int
>>> '{:5d} '*5
'{:5d} {:5d} {:5d} {:5d} {:5d} '