- join() method takes any python iterable object of string elements as its parameter and joins all of them with the source string as the separator returning the new string object.
- As strings in Python being immutable sequences join() is used frequently to obtain new strings composed from multiple strings.
# tuple of strings
words = ("draw", "me", "a", "sheep")
sentence = " ".join(words)
# Form comma separated values header using join
csvFields = ("id", "Last Name", "First Name", "Height", "Weight")
csvHeader = ", ".join(csvFields)
draw me a sheep
id, Last Name, First Name, Height, Weight