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 f48c619 commit ec8d2f9Copy full SHA for ec8d2f9
Doc/library/stdtypes.rst
@@ -2261,12 +2261,16 @@ expression support in the :mod:`re` module).
2261
done using the specified *fillchar* (default is an ASCII space). The
2262
original string is returned if *width* is less than or equal to ``len(s)``.
2263
2264
- For example::
+ For example:
2265
+
2266
+ .. doctest::
2267
2268
>>> 'Python'.ljust(10)
2269
'Python '
2270
>>> 'Python'.ljust(10, '.')
2271
'Python....'
2272
+ >>> 'Monty Python'.ljust(10, '.')
2273
+ 'Monty Python'
2274
2275
See also :meth:`rjust`.
2276
0 commit comments