Now you’re ready to use Python for file system operations! This is a huge step up. Working with files allows you to hold onto your data after a program terminates, load your data more quickly and conveniently, and move your data from one computer to another.
In this video course, you’ve learned how to:
- Create files and directories
- Iterate over the contents of a directory
- Search for files and folders using wildcards
- Move and delete files and folders
To reinforce what you’ve learned here, complete the quiz in the next lesson. Then, head over to Python Basics Exercises: File System Operations.
Then, keep growing your skill set as a programmer by continuing with the other Python Basics courses and getting yourself a copy of Python Basics: A Practical Introduction to Python 3.
For more information on the topics in this course, check out:
- Python 3’s pathlib Module: Taming the File System - Video Course
- Python 3’s pathlib Module: Taming the File System - Written Tutorial
- Working With Files in Python - Video Course
- Working With Files in Python - Written Tutorial
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.
Ray Osborn on Dec. 20, 2022
Very clear course. I am a little confused about shutil compatibility with path-like objects in older Python versions. It looks as if path-like objects could only be used as shutil arguments in v3.8, but the Python documentation seems to imply that the move function was only updated in 3.9. I guess that doesn’t affect this course, because we would use the pathlib replace function, but unfortunately many shared Python distributions still run 3.7.