Last active
August 1, 2020 21:11
-
-
Save heyswappy/ec195c4685ea0594e22300fd74a43532 to your computer and use it in GitHub Desktop.
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 # import the operating-system module | |
print(os.getcwd()) # print current working directory of the script | |
fp = open("file.ext") # open some file in the current working directory i.e. where script lives | |
# how does it know the location of file.ext | |
fp.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment