Daily Python
Day 10Python~40 min
Files — read & write
Persist notes with open()
Track progress0/15 days
What you'll learn
openreadwriteappendFileNotFoundError
- Read and write text files
- Handle missing files gracefully
- Build a note-taking app
Lesson & examples
Read the code, then the explanation — try changing values before the project.
Append a note
with open("notes.txt", "a") as file:
file.write("New line\n")