Skip to content

Instantly share code, notes, and snippets.

@asadamatic
Created April 16, 2020 12:24
Show Gist options
  • Save asadamatic/680a4aba620036bb1af15edd8d40ee56 to your computer and use it in GitHub Desktop.
Save asadamatic/680a4aba620036bb1af15edd8d40ee56 to your computer and use it in GitHub Desktop.
Finding a file in current working directory using python.
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