Using `os.linesep` explicitly isn't necessary.  Simply using `\n` will always insert to correct platform-specific line separator.