How do I change directories in python to run a file?

write the following at the top of your program:
import os
then write in your code:
os.chdir(path)
and where I've written path, write where you want to change to