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.
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.