I am trying to substitute a variable using format() and then format the resulting string using format().
This is what I ended up doing:
>>> '{:^50}'.format("Missing files for device : {0}".format(var))
' Missing files for device : abc '
where var is a variable holding 'abc'. Is there a better way to get the same result?