how to join letters in a list in python code example
Example 1: python merge list into string
>>> sentence = ['this','is','a','sentence']
>>> '-'.join(sentence)
'this-is-a-sentence'
Example 2: how to join a list of characters in python
>>> a = ['a', 'b', 'c', 'd']
>>> ''.join(a)
'abcd'
Example 3: how to join an array of characters in python
arrayOfCharacters = ["p", "y", "t", "h", "o", "n"]
string = ''.join(arrayOfCharacters)
#output: python