Here: We merge the strings without a delimiter (by specifying an empty string) and with a delimiter (a comma string).
Python program that uses join on list
list = ["a", "b", "c"]
# Join with empty string literal.
result = "".join(list)
# Join with comma.
result2 = ",".join(list)
# Display results.
Some notes, performance. It is best to avoid calling join() more than needed. For complex data structures, keep all elements in lists or maps—avoid excessive split() and join calls.Split
A summary. Join() is called on a string—often a string literal. This syntax confuses most beginning Python developers. But it makes logical sense—we are joining on a delimiter.