join documentation python code example
Example 1: join() python
# example of join() function in python
numList = ['1', '2', '3', '4']
separator = ', '
print(separator.join(numList))
Example 2: join python documentation
>>> ''.join(['A', 'B', 'C'])
'ABC'
>>> ''.join({'A': 0, 'B': 0, 'C': 0}) # note that dicts are unordered
'ACB'
>>> '-'.join(['A', 'B', 'C']) # '-' string is the seprator
'A-B-C'