Answers for "working directory python what is it"

15

working directory python

import os
cwd = os.getcwd()
Posted by: Guest on March-09-2020
0

what is my python working directory

# Import the os module
import os

# Get the current working directory
cwd = os.getcwd()

# Print the current working directory
print("Current working directory: {0}".format(cwd))

# Print the type of the returned object
print("os.getcwd() returns an object of type: {0}".format(type(cwd)))
Posted by: Guest on July-27-2021

Python Answers by Framework

Browse Popular Code Answers by Language