Loading...
The One-of-Each
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- junior, mid
Problem
The upstream data feed keeps sending duplicate records, and the warehouse load is rejecting the batch. Write a function that takes a list of records and a key field name, then returns a clean list with duplicates removed based on that key, keeping the first occurrence of each.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.