0

the code should take what i worte in the input and add it to the txt file but i get an error because of the path please take a look.

main = input("What Task Would You Like To Add?       >   ")

f = open("C:\tdl\tdlp\MyToDoList.txt", "w")
f.write("content added")
f.close()

f = open("MyToDoList.txt", "r")
print(f.read())

I have tried replacing file formats and paths

Patrick
  • 1,189
  • 5
  • 11
  • 19

0 Answers0