PyDocs

Nav

Python Runtime Services

str.join

builtins

method of str
  • str.join(iterable, /)
Concatenate any number of strings.

The string whose method is called is inserted in between each given
string.  The result is returned as a new string.

Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
1 Example
>>> ', '.join(['spam', 'spam', 'spam'])
'spam, spam, spam'
>>> '-'.join('Python')
'P-y-t-h-o-n'
from the Python docs
See Also
No see-alsos for builtins/str.join
0 Notes
No notes for str.join