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
2cwd = os.getcwd()
3
4my_file='image.png'
5file_path = os.path.join(cwd, my_file)
6file_path