python how join elements of a list into a string code example
Example: python join items in list
l = ['aaa', 'bbb', 'ccc']
s = ''.join(l)
print(s)
# aaabbbccc
s = ','.join(l)
print(s)
# aaa,bbb,ccc
s = '-'.join(l)
print(s)
# aaa-bbb-ccc
s = '\n'.join(l)
print(s)
# aaa
# bbb
# ccc