0
Q:

what is join use for in python

# example of join() function in python

numList = ['1', '2', '3', '4']
separator = ', '
print(separator.join(numList))
15
>>> sentence = ['this','is','a','sentence']
>>> '-'.join(sentence)
'this-is-a-sentence'
2

New to Communities?

Join the community