Python lists and loops in 30 min

lists, loops, slices

4 steps · about 28 min · Beginner

  1. An informal introduction to Python: lists (reference, Python docs, 6 min)

    Make, index and slice a list in the interpreter before any loop.

  2. More control flow tools: for statements (reference, Python docs, 5 min)

    The for loop as Python means it: over the items, not over an index.

  3. Python for loops: the definitive guide (tutorial, Real Python, 10 min)

    range, enumerate, zip and break/else with runnable examples.

  4. learn-python: lists (repo, trekhleb on GitHub, 7 min)

    Every list operation as a short test you can run and change.