PyDocs

Nav

Python Runtime Services

str.rjust

builtins

method of str
  • str.rjust(width, fillchar=' ', /)
Return a right-justified string of length width.

Padding is done using the specified fill character (default is
a space).
1 Example
>>> 'Python'.rjust(10)
'    Python'
>>> 'Python'.rjust(10, '.')
'....Python'
>>> 'Monty Python'.rjust(10, '.')
'Monty Python'
from the Python docs
See Also
No see-alsos for builtins/str.rjust
0 Notes
No notes for str.rjust