9951 explained code solutions for 126 technologies


pythonHow to get the current working directory


import os
cwd = os.getcwd()ctrl + c
os

module which provides functions for interacting with the operating system

os.getcwd

returns the absolute path of the working directory (where python is currently running) as a string