Jump to content

Python how to write on the next line

Go to solution Solved by Wictorian,
Just now, Wictorian said:

open("app locations.py", "a+").write(input(),"\n")

this runs but doesnt write

I figured it out now. I should use + instead of ,

8 minutes ago, Wictorian said:

So I am writing things to  a .py file using this code

,


open("app locations.py", "a+").write(input())

but it writes right next to each other. I want it to write on the next line

how do I do that?

\n

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×