Joining Strings : Join « String « Python Tutorial






word1 = "A"
word2 = "few"
word3 = "good"
word4 = "words"
wordList = ["A", "few", "more", "good", "words"]

print "Words:" + word1 + word2 + word3 + word4
print "List: " + ' '.join(wordList)








5.12.Join
5.12.1.Convert a list of characters back to a string
5.12.2.Joining Strings
5.12.3.Joining a list of words
5.12.4.Token splitting and delimiter joining.