+2 votes
in Programming Languages by (75.9k points)
What is the equivalent of Linux command 'pwd' in Python to see the current working directory?

1 Answer

+1 vote
by (353k points)
selected by
Best answer

To get the current working directory/folder using Python, you need to use getcwd() function of os module.

>>> import os
>>> os.getcwd()