Lesson 18 of 26 · about 15 min
Reading and writing files
Files let data outlive your program. Open a file, read it line by line or write to it, and Python closes it for you with a with block.
🔓 Unlock this lesson
This lesson is part of the DoingCamp Pass. Members get every lesson in every course, with all the interactive visuals, coding exercises and challenges.
In this lesson you'll learn:
- File
- with open(...)
- Parsing
Free to try in F02 Programming 1: Thinking in Steps:
The first 3 lessons of every course are free, no account needed.