I would like to replace "10" in the example below with a variable, but I haven't found any examples that work.
print(f'{"|":^10s}')
Can you suggest a method to set x=10
, then have:
print(f'{"|":^xs}')
Thank you.
I would like to replace "10" in the example below with a variable, but I haven't found any examples that work.
print(f'{"|":^10s}')
Can you suggest a method to set x=10
, then have:
print(f'{"|":^xs}')
Thank you.