Py

Lists & Tuples

Module 6 of 14, Beginner
📋

Lists & Tuples

Store sequences of values, grow and shrink them, slice and sort them, avoid copy bugs, and unpack tuples.

0 of 6 lessons complete

6 lessons, 56 min

Start module

Lessons

1

Lists: ordered collections

Keep many values in one variable and reach them by position.

8 min
2

Adding and removing items

Grow and shrink lists with append, insert, pop and friends.

10 min
3

Slicing and sorting

Grab parts of a list, sort it, and get quick stats.

10 min
4

Copies, aliases and safe loops

Understand why changing one list can change 'another', and how to copy.

10 min
5

Lists of lists

Model grids, boards and tables with nested lists.

9 min
6

Tuples and unpacking

Group fixed values in tuples and unpack them into variables.

9 min
🗂️
Next module

Dictionaries & Sets