How-To Guides

Step-by-step solutions for data handling, file operations, HTTP, databases, testing, and automation. Problem-focused and easy to reuse.

How-To guides are short, task-focused articles: you have a concrete goal (read a CSV, call an API, loop with an index) and you want working code and clear steps. Each guide assumes you know basic Python—Getting Started, data types, functions, and lists or dictionaries when relevant—and focuses on one problem at a time.

We cover files and data: read and write CSV, read and write JSON, read a text file, write to a text file, read YAML. HTTP and APIs: HTTP GET, HTTP POST, timeouts, retries. Databases: connect to SQLite, query SQLite safely. Lists and strings: loop with index (enumerate), sort a list, split a string, join strings. Environment and tooling: virtual environment, install with pip, environment variables. For data science workflows see CSV with Pandas, Matplotlib, and related guides.

Use the sidebar or the list below to jump to a guide. If you hit an error, check the Errors & Exceptions section (e.g. FileNotFoundError, KeyError) or the linked Basics and Concepts pages.