How to know current working directory in Python?

PythonServer Side ProgrammingProgramming

To know the current working directory or pwd use the os module.

For example

>>> import os
>>> print(os.getcwd())
/home/ayush/qna
raja
Updated on 12-Dec-2019 07:30:38

Advertisements