os.change dir python code example
Example 1: change directory in python script
os.chdir(os.path.dirname(__file__))
Example 2: os.chdir python
os.chdir("directory name")
os.chdir(os.path.dirname(__file__))
os.chdir("directory name")