← back to unit
Challenge
# power tools advanced
The Lost Library Cards
Every borrowed book should come back — compare the borrowed list against the returned pile. 📚
You get the borrowed book ids and the returned ids (returns may include weird extras — ignore those). Print the still-missing ids in alphabetical order, space-separated, or all returned.
Example:
Input: borrowed = ["b12", "a07", "c33"], returned = ["a07"]
Output: b12 c33
set(borrowed) - set(returned) removes "a07", leaving "b12" and "c33" still missing.
💡 need a hint?
pt-lost-library-cards.py🔒 given lines are locked — write your code in between
loading...