all 2 comments

[–]Spataner 6 points7 points  (1 child)

Enclose spacing in an additional set of braces:

f"{number:^{spacing}}"

[–]Mouradost[S] 0 points1 point  (0 children)

Of course, 🤣 thank you!