This may be a simple question however, I'm currently doing an assessment and I'm on the final section.
What I need to do is write a list to a text file, but in string format. What I mean by this is for example if I want the list ['the', 'cat', 'sat', 'on', 'the', 'mat']
if I want to write this list to a text file it writes it in this format, when I need it to be written in continuous prose so the cat sat on the mat
. I'm not sure how to do this? I tried adding str
before the .write
command but this doesn't solve my problem.