How do you get the current working directory using python?



How do you get the current working directory using python?..

Answer / Ranjeet Kumar Sinha

"To get the current working directory in Python, use the os module. Here's an example:n```nimport osncurrent_dir = os.getcwd()n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What is python? What are the benefits of using python?

1 Answers  


How will you differentiate between deep copy and shallow copy?

1 Answers  


Tell me what is the difference between list and tuple?

1 Answers  


What are the runtime errors?

1 Answers  


What is python orm?

1 Answers  


Does python have null?

1 Answers  


What are the optional statements that can be used inside a <try-except> block in python?

1 Answers  


Explain the use of try: except raise, and finally?

1 Answers  


How much bytes do integer and decimal data types hold in python?

1 Answers  


Tell me why and when do you use generators in python?

1 Answers  


Explain lambda expressions. When would you use one?

1 Answers  


What are python packages?

1 Answers  


Categories