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
1# print current working directory in python
2import os
3cwd = os.getcwd()
4print(cwd)
1import os
2#full path
3dir_path = os.path.dirname(os.path.realpath(__file__))
4
5#current dir
6cwd = os.getcwd()
7