Created
April 16, 2020 12:24
-
-
Save asadamatic/680a4aba620036bb1af15edd8d40ee56 to your computer and use it in GitHub Desktop.
Finding a file in current working directory using python.
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
import os | |
def searchFile(requiredFile): | |
if requiredFile in os.listdir(): | |
return True | |
else: | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment