1import os
2
3path = os.getcwd()
4
5print(path)
6# /Users/mbp/Documents/my-project/python-snippets/notebook
7
8print(type(path))
9# <class 'str'>
10
1import os
2
3#Get Current working Directory
4currentDirectory = os.getcwd()
5
6#Change the Current working Directory
7os.chdir('/home/varun')
8