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 @@ -2173,16 +2173,21 @@ expression support in the :mod:`re` module).
21732173 False
21742174
21752175
2176-
2177- .. _meth-str-join :
2178-
21792176.. method :: str.join(iterable, /)
21802177
21812178 Return a string which is the concatenation of the strings in *iterable *.
21822179 A :exc: `TypeError ` will be raised if there are any non-string values in
21832180 *iterable *, including :class: `bytes ` objects. The separator between
21842181 elements is the string providing this method.
21852182
2183+ For example:
2184+
2185+ .. doctest ::
2186+ >>> ' , ' .join([' spam' , ' spam' , ' spam' ])
2187+ 'spam, spam, spam'
2188+ >>> ' -' .join(' Python' )
2189+ 'P-y-t-h-o-n'
2190+
21862191
21872192.. method :: str.ljust(width, fillchar=' ', /)
21882193
You can’t perform that action at this time.
0 commit comments