
James L. answered 05/29/19
Harvard PhD Student for Computer Science / Programming Tutoring
Hello! I assume you're using Python 3.
You want to use
If you want to print a newline at the end:
Note that as of Python 3, the open() function (for files) has a newline parameter. If you don't set this parameter, any `\n` will automatically be translated into the OS-specific newline delimiter. So using `\n` should work!