pySohila’s learning labPYTHON / FIELD GUIDE 01

Work with real shapes of data / CORE PATH

Sets & reconciliation

Sets answer membership and difference questions without keeping duplicates.

2h planning budget · Sohila Khaled Abbas · Reviewed 2026-11-01

Use set differences to find missing foreign keys before a warehouse load.

Understand the idea

Sets answer membership and difference questions without keeping duplicates. Use set differences to find missing foreign keys before a warehouse load.

Work through the practice with a tiny fixture, predict the result before running it, and record one boundary case. Use the exit check as evidence before moving on.

What to learn

A small original example

observed = {1, 2, 2, 4}
reference = {1, 4}
print(sorted(observed - reference))

Practice on your own data

Task 11: report profile IDs absent from the reference set.

Practice this lesson in the Python lab →

EXIT CHECK

missing_ids([1, 2, 2, 4], [1, 4]) is [2].

Common pitfalls

Prerequisites

Dictionaries & grouping

Boot.dev chapter 11 · 06:19:51 ↗

Video and playlist companions

Choose one explanation for the concept, then attempt the practice. These are topic mappings, not a claim that every linked lesson covers every outcome.

Boot.dev · Python for Beginners

Loads YouTube on request. Open on YouTube ↗ if the owner restricts embedding.

كورس Python منحة ITI

Loads YouTube on request. Open on YouTube ↗ if the owner restricts embedding.

Sources and further reading

Track progress on this topic → · Markdown source ↗