It is up to you to decide how correct you wish to be. In most cases, \n will enough. You should look up the newline character in the os package if you really want to do it correctly. (It's actually referred to as linesep.)
Use the os.linesep instead of the os.linesep when writing to files with the Python API. Simply type \n, and Python will convert it to the appropriate newline character for your platform.