import os path = os.getcwd() print(path) # /Users/mbp/Documents/my-project/python-snippets/notebook print(type(path)) # <class 'str'>
import os cwd = os.getcwd()
import os os.getcwd()
import os #Get Current working Directory currentDirectory = os.getcwd() #Change the Current working Directory os.chdir('/home/varun')
# print current working directory in python import os cwd = os.getcwd() print(cwd)