I want to change the length of the formatting in my code,
symbolWanted = input('Input symbol wanted for triangle: ')
baseLength = int(input('Input base length of triangle(odd number): '))
for i in range (1,baseLength,2):
print(('{:^100}').format(i*symbolWanted))
is there a way to change the length of the format using a variable e.g.
print(('{:^baseLength}').format(i*symbolWanted))
Thank you.