Home > Blockchain >  Print text from right side
Print text from right side

Time:06-02

May I know how to print text to the right side like:

                                                                                 This text is at the extreme right

I only know center code is this:

print("This text is center".rjust(165//2))

Thanks Edit

str.rjust(165//2) is center text from:

How to place input function in center of page?

CodePudding user response:

You are doing well just try to use an int like this

print("Centered right".rjust(40, ""))

The first value is the amount of space de second is the filling item.

Hope it helps

  • Related