Skip to main content
Append journal entries to a text file with with open(), read them back line by line, and handle a file that doesn’t exist. Open Lab 32 in the IP Lab Portal

What you will practice

  • Write and append with with open()
  • Read the file line by line
  • Handle a missing file

Before you start

Time

20 minutes

Where

IP Lab Portal

Module

Module 13: File handling

  • In the IP Lab Portal, open Lab 32 - Daily journal file.
  • In class, this lab comes right after the Lesson 4 recap slide in Module 13 core material.