joining strings in python code example
Example 1: python merge list into string
>>> sentence = ['this','is','a','sentence']
>>> '-'.join(sentence)
'this-is-a-sentence'
Example 2: python concatenate strings
print “{0} {1} is {2} years old.” format(fname, lname, age)
Example 3: how to join strings in python
str1 = "Help"
str2 = "developers!"
print(str1 + ' ' + str2)
Example 4: combine two strings python
>>> 'a' + 'b' + 'c'
'abc'