python how to join a list to a string code example
Example 1: Concatenate Item in list to strings
>>> sentence = ['this','is','a','sentence']
>>> '-'.join(sentence)
'this-is-a-sentence'
Example 2: python join list
''.join(list) # If you want to join with comma (,) then: ','.join(list)