I'd like to avoid writing a newline character to the end of a text file in python. This is a problem I have a lot, and I am sure can be fixed easily. Here is an example:

```
fileout = open('out.txt', 'w')
list = ['a', 'b', 'c', 'd']
for i in list:
    fileout.write('%s\n' % (i))

```

This prints a \n character at the end of the file. How can I modify my loop to avoid this?