f.write redux

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

I tried your suggestion, but it never worked.
helloworld_single.py (604 Bytes)

Do:

f.write(s + '\r\n')

The \r\n part is called a newline. On linux you just need \n. On windows you need both.

Note that this is a regular python problem. For these types of questions you can easily google for the solution. I’ll answer, but, you’ll be able to find what you need faster for things that sound like they are regular python problems.

Thanks for the help. Where do you find the time for noobies like me??
Regards
Jim Sullivan

I just try to answer all questions. :slight_smile: