Is there a way to make my text start from a certain point?

Question:

So I want to make something like that will print like this

100|
..50|
….0|

(the dots are there bc I couldnt make it appear in here without it)
ive been thinking of using a for loop to check how many spaces it should have, but I’m just wondering if there is anything else that is more efficient

Asked By: Jusepez

||

Answers:

Try to use format() For example, the following script print from 0 to 100, align to right(>), and the space is 10 digits(10d)

for t in range(0,101,10):
    print("{:>10d}".format(t))
Answered By: ALPHATU
Categories: questions Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.