python script change working directory code example
Example 1: change directory in python script
os.chdir(os.path.dirname(__file__))
Example 2: how to use path to change working directory in python
pip install path
from path import Path
# set working directory
Path("/toWhereYouWantItToBe").cd()