In [1]:
import os

In [2]:
path = os.getcwd()

In [3]:
print(path)


/Users/mbp/Documents/my-project/python-snippets/notebook

In [4]:
print(type(path))


<class 'str'>

In [5]:
os.chdir('../')

In [6]:
print(os.getcwd())


/Users/mbp/Documents/my-project/python-snippets