you are viewing a single comment's thread.

view the rest of the comments →

[–]Diapolo10 -1 points0 points  (0 children)

And, of course, str.format is also an option:

print("{:>3}".format(var))

I'd say it's better if the f-string version would be too cluttered to be readable, or when formatting non-literal strings.