looking for some solutions? You are welcome.

SOLVED: Newline to txt file python

Lance Lao:

I am trying to create a simple program which asks users for input then puts it into a txt file but my problem is that it's not going into a new row.

user1=input(ex.Day1)
user2=input(ex.Day2)

The result in my txt file now is

Day1Day2

I want to achieve

Day1
Day2

in my txt file. This is the code that I used.

fout = open("savedplans.txt", "w")
    fout.writelines(plan_list )
    fout.close()

Please help me and thanks!



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
Share:

No comments:

Recent