Python

23 articles in this topic

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 29 Aug 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 29 Aug 20265 min readPython

Conditionals in Python: If, Elif and Else with Worked Examples

Learn how Python chooses a branch, then trace exact examples covering Boolean operators, truthiness, nesting, short-circuiting and common mistakes.

Updated 26 Aug 20266 min readPython

Python String Methods: A Practical Tutorial With Worked Examples

Stop memorising isolated methods. Trace Python strings through indexing, cleanup, searching, splitting, validation and formatting, with exact results and the traps coding tests use.

Updated 24 Aug 20265 min readPython

Sets in Python: A Complete Tutorial with Worked Examples

Learn how Python sets store unique values, how each core operation works, and how to avoid the errors that catch beginners, with every output worked through.

Updated 23 Aug 20266 min readPython

Numbers and Arithmetic in Python: Operators, Precision, and Worked Examples

Understand how Python evaluates numeric expressions, from result types and precedence to negative floor division and floating-point comparison. Runnable examples culminate in one complete practice-session calculation.

Updated 21 Aug 20266 min readPython

Python Introduction and Setup Tutorial: Install, Verify, and Run Your First Programs

Set up Python with confidence by checking the command, isolating a project in .venv, and running a saved program whose output you can verify step by step.

Updated 19 Aug 20266 min readPython

Python Functions and Modules: Complete Guide with Worked Examples

Build a reliable mental model for Python functions, scope, imports, and packages, then trace a two-module score report from call to printed result.

Updated 17 Aug 20266 min readPython

Python Tuples Tutorial: Packing, Unpacking, Methods and Examples

Learn how Python tuples work through runnable examples, a fixed-record route program, precise error fixes and four predict-before-running exercises.

Updated 15 Aug 20266 min readPython