So, my idea is, if I just throw a python script into a folder, for example this:
path = r"C:\Users\[name]\Downloads"
print("This:", path, "is your path")
Can I tell Python to find the folder the script is in, and fill the path variable by itself, without having to manually add the path?
I've tried with these:
os.path.abspath(os.getcwd())
and
"\n".join(sys.path)
But didn't get the results I want.
*Information:
- I'm using Python 3.9
- Windows 10*