Obtenez WD dans Python
import os
path = os.getcwd()
print(path)
# /Users/mbp/Documents/my-project/python-snippets/notebook
print(type(path))
# <class 'str'>
Happy Hawk
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
#Get Current working Directory
currentDirectory = os.getcwd()
#Change the Current working Directory
os.chdir('/home/varun')
import os
os.getcwd()