Python Basics: Reading and Writing Files

Bartosz Zaczyński
Bartosz Zaczyński 13 Lessons 1h 10m basics python

Files are everywhere in the modern world. They’re the medium in which data is digitally stored and transferred. Chances are, you’ve opened dozens, if not hundreds, of files just today! Now it’s time to read and write files with Python.

In this video course, you’ll learn how to:

  • Understand the difference between text and binary files
  • Learn about character encodings and line endings
  • Work with file objects in Python
  • Read and write character data in various file modes
  • Use open(),, and the with statement
  • Take advantage of the csv module to manipulate CSV data

This video course is part of the Python Basics series, which accompanies Python Basics: A Practical Introduction to Python 3. You can also check out the other Python Basics courses.

Note that you’ll be using IDLE to interact with Python throughout this course. If you’re just getting started, then you might want to check out Python Basics: Setting Up Python before diving into this course.

What’s Included:

Downloadable Resources:

Related Learning Paths:

About Bartosz Zaczyński

Bartosz is a bootcamp instructor, author, and polyglot programmer in love with Python. He helps his students get into software engineering by sharing over a decade of commercial experience in the IT industry.

» More about Bartosz

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

« Browse All Courses