In Python, we can use os.getcwd() to get the current working directory. For example,
import os cwd = os.getcwd() print(cwd)
Output
C:\projects\python
In Python, we can use os.getcwd() to get the current working directory. For example,
import os cwd = os.getcwd() print(cwd)
Output
C:\projects\python