Journey

Shapes

This journey teaches the core Python habit of choosing a data shape, transforming it directly, and making the result visible.

In this journey

  • Pick the container that matches the question.
  • Move between shapes deliberately.
  • Cross text and data boundaries.

Pick the container that matches the question.

Lists, tuples, dictionaries, and sets answer different questions about order, position, lookup, and uniqueness.

LIST[a,b]orderedTUPLE(a,b)fixedDICT{k:v}lookupSET{a,b}unique
Each container answers a different question: ordered, fixed, lookup, unique.
  • Lists

    Use this example to store ordered mutable data.

  • Tuples

    Use this example to group fixed-position values.

  • Dictionaries

    Use this example to look up values by key.

  • Sets

    Use this example to model uniqueness and membership.

  • Collections Module

    Use this example to show `deque`, `Counter`, `defaultdict`, and `namedtuple` as specialized shapes.

Move between shapes deliberately.

Most everyday Python code is data reshaping, so learners need the idioms for selecting, unpacking, and rebuilding values.

[3,1,4]sorted[1,3,4]
Most everyday code reshapes data: one input, one transform, one new value.
  • Unpacking

    Use this example to bind names from structured values.

  • Slices

    Use this example to select ranges from sequences.

  • Comprehensions

    Use this example to build concrete collections from compact loops.

  • Comprehension Patterns

    Use this example to compose filters and nested transformations.

  • Sorting

    Use this example to order records with key functions.

  • Copying Collections

    Use this example to contrast shallow copies, deep copies, and shared nested data.

Cross text and data boundaries.

Programs often receive text and produce structured data, so parsing and serialization belong in the data journey.

"42"TEXTparseINT42
Programs receive text and produce structured data; parsing makes the boundary explicit.
  • Number Parsing

    Use this example to turn text into numbers safely.

  • JSON

    Use this example to move structured data across a text boundary.

  • Regular Expressions

    Use this example to extract structure from text patterns.

  • Dates and Times

    Use this example to represent dates, times, and durations as typed values.

  • CSV Data

    Use this example to show row-shaped text data and dictionary records.