Back
How to set the current working directory in Python?
You can use the chdir() method of the os module in python like this:
import osos.chdir('/path/to/new/directory')
import os
os.chdir('/path/to/new/directory')
To know more about this you can have a look at the following video:-
30.9k questions
32.9k answers
500 comments
665 users