/  Technology   /  Python Program to fetch the current working directory
pandas-exercises (i2tutorials)

Python Program to fetch the current working directory

Here in this exercise we will use “os” module.

This “os” module provide us the method “getcwd()” to fetch the information about current working directory.

First, we need to import the OS module

import os

Let us call the function now.

os.getcwd()

Output:

'C:\\Users\\admin'

Below is the complete code:

import os
os.getcwd()

Leave a comment