Python
45 articles in this topic

Python Generators and Iterators Tutorial: yield, next() and Lazy Evaluation
Build Python's iterator protocol from a three-value list, trace generators one request at a time, and practise safe one-pass pipelines with exact outputs.

Introduction to Python: Core Concepts, Worked Trace and Exam Patterns
Build a reliable Python tracing method from names and types to loops and mutable lists. Follow one function across every iteration and check its exact output.

Python Classes and Objects Tutorial: Build a Student Model Step by Step
Build one Student class, create independent objects, and trace every value. The examples show how constructors, methods, and attribute lookup work in Python.

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.

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.

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.

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.

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.

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.

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.

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.

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.