Operating System Commands
Learn about the different functions present in the operating system module.
We'll cover the following...
Introduction to OS commands
Python also provides you with a module that has operating system commands. Here are some of the functions available when you import os
:
-
Use
os.getcwd()
to get the current working directory. -
Use
os.chdir(
path
)
to change the current working directory topath
. -
Use
os.listdir(path=".")
to ...