How to search for a file in all directories using Python

I'm pretty new when it comes to Python, so excuse me if this is a very simple thing.

How do I search the program for a file across the whole computer and add the file directory to a string?

For example, I want to search for example.py, although I don't know where it might be located.

PS: I'm using Python 3.6.2 if you need to know that.

Thanks for the help!

+3


source to share





All Articles