Throughout this section, we explain the main modules you can find in Python for working with the filesystem, accessing files and directories, reading and creating files, and operations with and without the context manager.
Working with the filesystem in Python
Accessing files and directories
In this section, we review how we can work with the filesystem and perform tasks such as browsing directories or reading each file individually.
Recursing through directories
In some cases, it is necessary to iterate recursively through the main directory to discover new directories...