# File Input and Output in Python

Learn everything about file input and output with Python. We'll cover how to read and write to files, copy and move them to different locations and finally deleting them.

#### TECHNOLOGIES

File Automation

#### WATCH TIME

23 minutes

## Lessons

#### Copying, Moving and Renaming Files

Learn how to copy, move, and rename files with Python.

6 min

#### Deleting Files and Folders

Learn how to programmatically delete files and folders with Python.

5 min

#### OS Functions & Reading and Writing to Files

Learn how to use different OS functions in Python to access our files, and then read and write to them using I/O methods.

12 min

### Hey! I’m Avi, and I’ll teach you how to build!

I'm Avi, your new Python instructor and founder of The Codex.

Three years ago I was stuck. I wasn’t learning anything in my theory-filled CS classes, my friends took pictures of me sleeping in lecture, and I was questioning why I was even learning CS to begin with. I had ideas but I was clueless on execution.

After watching hours of webcasted YouTube videos, enrolling in course after course, and struggling to stay motivated, I finally obtained the skills to bring my ideas to life. I realized how lonely and gruesome this process was.

If you’re a student just like me, you know exactly what it’s like to be stuck in course hell. The best programmers of today learned by doing, not by reading syntax in a textbook.

Join The Codex. Become a creator.

## Savvy Students ❤️ The Codex

The Codex has helped hundreds of students find jobs and build their dream projects.

“For the first time in my life I’ve found a platform that can keep me engaged for more than 5 minutes. Project on The Codex are _entertaining, informative, and more valuable_ than the countless hours of lectures I watched at 2x speed in school.”  
Maddie Wilson  
University of Toronto, 2023

## Ready to dive in? Start learning today.
