There must already exist a gazillion articles about how to do this; but one more won’t hurt, right?
Suppose you have a list, called
alist, as the following:
In : alist Out: ['apple', 'banana', 'pear']
To create a string from “alist” with a comma separator, we can do this:
In : ','.join(alist) Out: 'apple,banana,pear'
Basically, you can place a desired separator in the
',' or omit it totally.