We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ad9844 commit 03724cdCopy full SHA for 03724cd
Doc/library/stdtypes.rst
@@ -2125,6 +2125,19 @@ expression support in the :mod:`re` module).
2125
done using the specified *fillchar* (default is an ASCII space). The
2126
original string is returned if *width* is less than or equal to ``len(s)``.
2127
2128
+ For example:
2129
+
2130
+ .. doctest::
2131
2132
+ >>> 'Python'.ljust(10)
2133
+ 'Python '
2134
+ >>> 'Python'.ljust(10, '.')
2135
+ 'Python....'
2136
+ >>> 'Monty Python'.ljust(10, '.')
2137
+ 'Monty Python'
2138
2139
+ See also :meth:`rjust`.
2140
2141
2142
.. method:: str.lower()
2143
0 commit comments