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
Published on 22-Dec-2017 14:24:29
Advertisements