The os Module for Operating System Interaction in Python


Interact with the operating system using the os module for tasks like changing the working directory, listing directory contents, and more.

Source Code

import os
print(os.getcwd())  # Current working directory
os.mkdir("new_directory")  # Create a new directory
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments