What is the purpose of os.getcwd() in Python?

92 views

What is the purpose of os.getcwd() in Python?

What is the purpose of os.getcwd() in Python?

solveurit24@gmail.com Changed status to publish February 13, 2025
0

Returns the current working directory.

import os
print(os.getcwd())  # Outputs the current directory path

solveurit24@gmail.com Changed status to publish February 13, 2025
0