f.write

What should my f.write command look like to get an output file that looks like this:
123
456
789
etc.

instead of this:
123456789

JIM

Use ā€˜\nā€™ at the end of the string you are writing.