join elements of list code example
Example 1: how to join a list of characters in python
>>> a = ['a', 'b', 'c', 'd']
>>> ''.join(a)
'abcd'
Example 2: what is join use for in python
>>> sentence = ['this','is','a','sentence']
>>> '-'.join(sentence)
'this-is-a-sentence'