def writeFile(filename):
prose = r"<?xml version='1.0' encoding='UTF-8'?>"
startTag = r'<Books>'
endTag = r'</Books>'
with open(filename, "+a" ) as f:
f.write(prose)
f.write('\n')
f.write(startTag)
f.write('\n')
f.write(endTag)
How do i make this function platform independent so it can work on Windows and Linux/Unix as well Since /n is the new line character on windows.
I am on Python 3.3