I am trying to append the data from a variable to the end of a file Python - **on a new line**. I have used this method: `(variable+"/n")` but in the file it has all of the file data on one line including the `/n` symbol.

My code *(this is an example! So it makes sense in exactly what I want to be answered)*:

```
list = ["apple","pear","strawberry"]
f = open("test.txt","a")
for x in list:
    f.write(x+"/n")
    print(x)
f.close()

```

Output in `test.txt`:

```
apple/npear/nstrawberry/n

```

What can I do so that the output looks like this:

```
apple
pear
strawberry

```

Thank you in advance for your answers!