print in what direcotry we are python code example
Example 1: how to check in which directory python in running
import os
cwd = os.getcwd()
Example 2: pathlib path get directory of current file
import pathlib
pathlib.Path(__file__).parent.absolute()