Code Lab BetaBUILD. RUN. DISCOVER.

Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.

PYTHON / CHAPTER 05

Python
Files.

Files in Python: open, csv, json, errors, and Files Engine v1. Learn and Practice per lesson; challenges are separate.

Choose a section

Lesson with explanation and a guided task. Theory stays readable; completion requires a passing solution.

Challenges are optional and do not block the next chapter.

Start lesson
Python

12 lessons available

The foundations behind your ideas.

  1. 01

    Import Modules · Locked

    csv and json

    Open lesson
  2. 02

    Paths Workdir · Locked

    Relative paths

    Open lesson
  3. 03

    Read Text · Locked

    read() whole file

    Open lesson
  4. 04

    Process Lines · Locked

    strip and join

    Open lesson
  5. 05

    Write Append · Locked

    Modes w and a

    Open lesson
  6. 06

    Missing File · Locked

    FileNotFoundError

    Open lesson
  7. 07

    CSV Read · Locked

    DictReader

    Open lesson
  8. 08

    CSV Write · Locked

    csv.writer

    Open lesson
  9. 09

    Nested Rows · Locked

    list[dict]

    Open lesson
  10. 10

    JSON Serdes · Locked

    Serialization

    Open lesson
  11. 11

    JSON Files · Locked

    dump/load + errors

    Open lesson
  12. 12

    CSV JSON Report · Locked

    Files Engine v1

    Open lesson
Python Files — CSV, JSON, and the lab folder | Code Lab