python os.chdir code example
Example 1: change directory in python script
os.chdir(os.path.dirname(__file__))
Example 2: os.chdir python
os.chdir("directory name")
Example 3: python os module
#the os module provides an operating system interface from Python
import os
#prints the name of the operating system
print(os.name)
#prints the absolute path for the module
print(os.getcwd())