1lines2 = " ".join(lines) # Converts the list to a string.
2 # This should work for writing to a file
3file.write(lines2)
1mystring = 'hello, world'
2
3myarray = string1.split(', ') #output => [hello, world]
4
5myjoin1 = ', '.join(myarray) #output => hello, world
6myjoin2 = ' '.join(myarray) #output => hello world
7myjoin3 = ','.join(myarray) #output => hello,world