Python

90 articles in this topic

Python Tokens, Variables, Data Types and I/O: Worked Examples from Input to Output

Trace one Python program from keyboard text through name binding, numeric conversion, a Boolean decision and formatted output, then test the common traps.

Updated 14 Sep 20265 min readPython

Python Lambda and Higher-Order Functions: Runnable Examples, Traps, and Exercises

Build lambdas from ordinary functions, pass them into higher-order operations, and trace a complete Python data pipeline. Then fix common errors and test yourself with runnable exercises.

Updated 12 Sep 20265 min read84 viewsPython

Python Comprehensions Tutorial: List, Set and Dictionary Examples

Learn to read Python comprehensions in execution order, choose the right output collection, trace nested forms, and repair common syntax mistakes with runnable examples.

Updated 11 Sep 20266 min readPython

Python File Handling and Data Analysis: A Complete Worked Guide

Follow one Python standard-library program from safe CSV reading and row validation to exact topic summaries, rejected-row tracking, and reproducible output files.

Updated 30 Oct 20265 min readPython

Introduction to Python: Syntax, Execution and Worked Examples

Build a reliable Python mental model, then trace values, branches, loops, aliases and a five-score function without skipping a state change.

Updated 30 Oct 20266 min readPython

Python Collections and Strings: Complete Guide with a Worked Word Counter

Choose the right built-in Python container, trace aliases and slices correctly, and combine all five types in a worked word-counting pipeline.

Updated 6 Sep 20266 min read110 viewsPython

Loops in Python: for, while, range(), break and continue

Learn to predict Python loop output one pass at a time, choose the right loop, and avoid boundary, update, and list-modification errors.

Updated 5 Sep 20266 min readPython

Python Loop Patterns and Idioms: A Practical Tutorial

Move beyond manual counters and fragile flags. Learn the Python loop idioms that make iteration, filtering, aggregation, pairing, and search easier to read.

Updated 3 Sep 20265 min readPython

Functions in Python: Parameters, Return Values, Scope and Examples

Build, call and debug Python functions through traced examples. Learn how arguments, local scope and return values work, then test yourself with short exercises.

Updated 2 Sep 20265 min readPython

Python Variables and Data Types: Beginner Tutorial with Worked Examples

Learn how Python names bind to objects, how built-in types behave, and why conversion and mutation matter. Trace a complete learner record and test yourself with runnable examples.

Updated 31 Aug 20265 min readPython

Strings in Python: Indexing, Slicing, Methods and Worked Examples

Build a reliable mental model for Python strings, then practise it through exact outputs, common traps and a complete record-cleaning program.

Updated 30 Oct 20266 min readPython

Python Setup for Beginners: Install and Run Your First Program

Build a clean Python project from scratch, verify the interpreter, run a complete program and diagnose the setup mistakes that catch most beginners.

Updated 30 Oct 20265 min readPython