Created
August 20, 2018 15:18
-
-
Save s3afroze/80642159559979e627a645529fe3a296 to your computer and use it in GitHub Desktop.
How to get a file anywhere in the computer?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f = 'filename' | |
for path, dirs, files in os.walk('.'): | |
if f in files: | |
os.chdir(path) | |
break | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment