0
Write a method in python to write multiple line of text contents into a text file daynote.txt line.
5 Antworten
0
What have you tried?
0
Awesome, post the code
0
Njan code idatte..
0
Yep idu
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())