No One Left Behind
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L4
Problem
You're reconciling two exported tables given as lists of dicts, `left` and `right`, that share a `key` field: combine them the way a SQL left join does, keeping every `left` record and merging in the fields of the first `right` record that shares its `key`. Every output row must expose the same right-side columns (every field name appearing anywhere in `right`, except the join `key`), so an unmatched row, or a match that lacks one of those fields, carries `None` there.
Summary
Every record stays; fill the gaps where a match exists.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.