Code Legions0.133 (beta)
HomeCode KingdomExercises
Sign in
Code KingdomQuestsGame modesCreateGalleryGuide

2Data

Keeping many things at once: lists, dictionaries, tuples, sets, comprehensions and match.

0 of 48 quests 0

You're playing as a guest: your progress won't be saved until you sign in.

Sign in Make an account

1 Lists

Many things in one value: waypoints, safe ground, the farthest tree, every rock, the richest, a tower each.

2 Dictionaries

Look things up by name: prices, the backpack, a pirate map, who guards where, jobs, a shopping list, sheep counts.

3 Tuples

Pairs like (x, y): unpacking, swapping, divmod, enumerate, zip and sorting tables.

4 Sets

One of each: where you've been, what two groups share, what's missing, and a whole island explored.

5 Comprehensions

A list in one line: filters, dict comprehensions, any, all, sum and sorted with a key.

6 match and case

Choosing by pattern: sorting words, orders with data, dictionaries and game objects, and an interpreter.