change directory python terminal code example
Example 1: change directory in python script
os.chdir(os.path.dirname(__file__))
Example 2: change working directory python
import os
os.chdir(new_working_directory)
os.chdir(os.path.dirname(__file__))
import os
os.chdir(new_working_directory)