0

Write a method in python to write multiple line of text contents into a text file daynote.txt line.

19th Apr 2020, 4:31 PM
JolsanaJaimon
JolsanaJaimon - avatar
5 Antworten
0
What have you tried?
19th Apr 2020, 5:11 PM
Slick
Slick - avatar
0
Awesome, post the code
19th Apr 2020, 5:17 PM
Slick
Slick - avatar
0
Njan code idatte..
19th Apr 2020, 5:58 PM
Anitta P Markose
Anitta P Markose - avatar
0
Yep idu
19th Apr 2020, 6:00 PM
JolsanaJaimon
JolsanaJaimon - avatar
0
def write(text): f=open("daynote.txt","a") f.write(text) f.close() while True: text=input("Enter your text:") choice=input("Do you want to enter more lines: Y/N") write(text) if choice=="N" or choice=="n": break f=open("daynote.txt","r") print(f.read())
19th Apr 2020, 6:30 PM
Anitta P Markose
Anitta P Markose - avatar