python specify working dir code example
Example 1: get current working directory python
# print current working directory in python
import os
cwd = os.getcwd()
print(cwd)
Example 2: setwd python
os.chdir("/home/varun/temp")
# print current working directory in python
import os
cwd = os.getcwd()
print(cwd)
os.chdir("/home/varun/temp")