1import os
2
3#Get Current working Directory
4currentDirectory = os.getcwd()
5
6#Change the Current working Directory
7os.chdir('/home/varun')
8
1import os
2current_working_directory = os.getcwd()
3print(current_working_directory) # should print the cwd
4
5""" Bonus: If you want to change cwd, without moving file,
6use the following method"""
7os.chdir("path/to/directory")