How to Get a List of All Files in a Directory With Python - Real Python
Briefly

Getting a list of all the files and folders in a directory is a natural first step for many file-related operations in Python.When looking into it, though, you may be surprised to find various ways to go about it.When you're faced with many ways of doing something, it can be a good indication that there's no one-size-fits-all solution to your problems.
Read at Realpython
[
|
]