I have a file in the format of one word for line, and I want to join the lines with one space, I tries this, but it does not work
for line in file:
new = ' '.join(line)
print (new)
also this does not work
new = file.replace('\n'', ' ')
print (new)