EN
Python - how to find current directory?
1
answers
0
points
How do I find the current directory with Python?
I want to get the full path to the directory a Python file is contained in.
1 answer
0
points
To get the current directory path import os
module and use getcwd()
method.
import os
current_directory = os.getcwd()
print(current_directory) # C:\Users\user\PycharmProjects\...
0 comments
Add comment