Computer >> Computer tutorials >  >> Programming >> Python

How to know current working directory in Python?


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

For example

>>> import os
>>> print(os.getcwd())
/home/ayush/qna