Results for “python set”

Showing 1–10 of 47

  1. Example

    Creating Sets

    Sets store only unique elements without a specific order.

    Audio lesson set unique
  2. Challenge

    Settings with defaults

    Build a user's settings by copying the defaults and laying their own values on top with update(), so any setting they haven't changed falls back, then warn about unknown keys instead of saving them.

    Write the code Medium 2 stages dictionaries copy update defaults
  3. Challenge

    Manifest diff

    Compare yesterday's and today's cargo IDs with set difference to print what was added and what was removed, then count what stayed with an intersection and print none for an empty change.

    Write the code Easy 2 stages sets difference intersection sorted
  4. Challenge

    Duplicate events

    …keeping the first copy, by checking every ID against a set of IDs already seen, then report which IDs came in more than once.

    Write the code Medium 2 stages sets add in deduplication
  5. Challenge

    Airlock permissions

    Nobody operates an airlock on trust. Each action needs a set of permissions, from basic operator training to the commander's approval for opening the outer hatch, and the airlock's control panel…

    Write the code Medium 2 stages sets subset difference permissions