human
writing string to a file on a new line everytime?
assistant
Here is some code to writing string 'text to write\n' to file `f`

f.write('text to write\n')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.