The built-in os module has a number of useful functions that can be used to list directory contents and filter the results. In this lesson, you'll learn about os.listdir() and os.scandir().The lesson also covers another way to get a directory listing using the pathlib module.
Click here to learn more: https://realpython.com/courses/practi...