Os
The `os` module provides a portable interface to operating system functionality. It handles file operations, processes, and environment variables. The guide walks through Directory Operations, File Operations, Path Utilities, Environment & Process. `os.getcwd()` gets the current directory. `os.chdir()` changes it. `os.listdir()` lists files. `os.mkdir()` creates a directory. `os.makedirs()` creates intermediate directories. `os.rmdir()` removes empty directories. `os.remove()` deletes a file. `os.rename()` renames/moves files. `os.stat()` gets file metadata. `os.walk()` recursively traverses directory trees. `os.path.join()` intelligently joins path components. `os.path.exists()`, `isfile()`, `isdir()` check path types. `os.path.basename()`, `dirname()`, `split()`, `splitext()` parse paths. The guide is organized into 4 sections that build on each other, each pairing a prose explanation with runnable code. Browse the individual functions covered by this guide in the OS Module category. Key APIs covered include os.getcwd(), os.chdir(), os.listdir(), os.mkdir(), os.makedirs(), os.remove(). Related guides: builtins, string, list, dict, re.