File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -2186,16 +2186,21 @@ expression support in the :mod:`re` module).
21862186 False
21872187
21882188
2189-
2190- .. _meth-str-join :
2191-
21922189.. method :: str.join(iterable, /)
21932190
21942191 Return a string which is the concatenation of the strings in *iterable *.
21952192 A :exc: `TypeError ` will be raised if there are any non-string values in
21962193 *iterable *, including :class: `bytes ` objects. The separator between
21972194 elements is the string providing this method.
21982195
2196+ For example:
2197+
2198+ .. doctest ::
2199+ >>> ' , ' .join([' spam' , ' spam' , ' spam' ])
2200+ 'spam, spam, spam'
2201+ >>> ' -' .join(' Python' )
2202+ 'P-y-t-h-o-n'
2203+
21992204
22002205.. method :: str.ljust(width, fillchar=' ', /)
22012206
You can’t perform that action at this time.
0 commit comments