I have the following code which must delete a specific line in the text file notes.txt
:
f = open("notes.txt","r+")
notestext = f.read()
print("NOTES:")
print(notestext)
enter = input("Press enter to add or change notes \n")
print("Type delete to delete a note or add to add a note")
start = input()
if start == "add":
notetoadd = input("Type your note to add \n")
f.write("\n")
f.write(notetoadd)
Here is the problem, i dunno what to put here:
if start == "delete":
notetodelete = input("Type the note you want to delete \n")
f.close()