How to find current directory of program execution 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 13-Dec-2019 10:43:04

Advertisements