Is it possible to use a variable inside of a Python string formatting specifier?
I have tried:
display_width = 50
print('\n{:^display_width}'.format('some text here'))
but get a ValueError: Invalid format specifier. I have also tried display_width = str(50)
however, just entering print('\n{:^50}'.format('some text here')) works just fine.