# Python Level 2: Decisions & Loops

> Level 2: Decisions & Loops of the LoWisa Python course: Conditions, Iteration and Loops, Writing Clear Program Flow. 3 lessons and 9 ideas, each explained in one line.

Decisions & Loops is level 2 of 17 of the [LoWisa Python course](/courses/python/). It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

## Conditions

- **if, elif, else.** Python chains decisions with if, **elif** and else: the first true branch runs and the rest are skipped.
- **Comparisons and membership.** Beyond == and <, the **in** operator asks whether a value sits inside a string, list or dictionary.
- **Truthiness.** Empty things are false in a condition: an empty string, list or dict all count as **falsy**.

## Iteration and Loops

- **The for loop.** A Python **for** loop walks the items of any iterable directly: no index bookkeeping unless you ask for it.
- **range and enumerate.** **enumerate** hands you each item together with its position, replacing the manual counter.
- **while and break.** A **while** loop runs until its condition fails, and break exits any loop the moment you are done.

## Writing Clear Program Flow

- **Guard clauses.** Handling the bad case first and returning early keeps functions flat: a **guard** clause beats nested ifs.
- **Loop else.** Python’s loop **else** runs only when the loop finished without break: a niche tool worth recognising when read.
- **Flat is better.** The Zen of Python says **flat** is better than nested: every extra level of indentation is a tax on the reader.

## Before and after this level

- **Before:** [Level 1: Python Foundations](/courses/python/level-1-python-foundations/): Variables, Values and Operators, Strings, Numbers and Booleans, Reading and Writing Python.
- **Next:** [Level 3: Python Collections](/courses/python/level-3-python-collections/): Lists and Tuples, Dictionaries and Sets, Comprehensions and Collection Patterns.

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See [Checkpoints and flashcards](/help/checkpoints-and-flashcards/).

## Frequently asked questions

### What does Python Level 2: Decisions & Loops cover?

Conditions, Iteration and Loops, Writing Clear Program Flow: 3 lessons and 9 ideas.

### What should I know before this level?

The level before it, Level 1: Python Foundations, which covers Variables, Values and Operators, Strings, Numbers and Booleans, Reading and Writing Python.

## Learn Python on your phone

The first level is free. LoWisa is on Google Play and the App Store.

---

Source: https://lowisa.dev/courses/python/level-2-decisions-and-loops/ · Updated 2026-11-16
