Name

.join()

Examples
separator = ' and '            # String to separate sequence items by.
words = ['this', 'that']       # String to join.
joined = separator.join(words) # Join items in sequence words,
                               # separated by 'separator'.
print(joined)

polyhedra = ["cube", "dodecahedron", "icosahedron"]

# The .join() method is often called on a string literal, without assigning it
# to a variable first.
joined = ", ".join(polyhedra)

print(joined) # Prints "cube, dodecahedron, icosahedron"
Description
Syntax
	separator.join(sequence)
Parameters
separator
sequence
Related String Formatting
.find()
.strip()
.split()
.replace()
Updated on Wed Jan 18 17:32:21 2017.
Creative Commons License