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
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")