1. OS module interacts with your operating system.
Use this to create folder, remove folder, move folder, change the working directory.
Ex:
import os
curDir=os.getcwd() #get current working directory
print(curDir)
os.mkdir('praveen') # make a new directory
os.rename('praveen','trainer')#change the name of , or rename, a directory
os.rmdir('trainer') #remove a directory
2. OS Module interacts with your operating system for navigating directories.
Ex:
import os
#where are we?
#cwd=os.getcwd()
print("1:",os.getcwd())
#go down
os.chdir("Scripts")
print("2:",os.getcwd())
#go back up
os.chdir(os.pardir)
print("3:",os.getcwd())
os.chdir(os.pardir)
print("4:",os.getcwd())