Skip to main content
πŸ”’ Preview mode. The first 15 Foundations lessons are free; this one is Pro. Start a 7-day trial to unlock the editor, AI hints and the the rest of the curriculum. Card required, cancel any time in Dashboard.Start 7-day trial β†’
⚑
← Coursesβ€ΊPython for Office WorkersModule 4 Β· Email automation Β· Recapβ€ΊπŸŽ― Review: Automation module 4 recapscenario17 / 54
+80 XP
Task
Build `filter_excel_rows(rows, condition)` β€” used after every CSV/Excel read to narrow to actionable rows: - `rows` is a list of dicts (Excel/CSV row shape). - `condition` is a callable: `(row: dict) -> bool`. Keep rows where `condition(row)` is truthy. - If `condition(row)` raises for any row, skip that row (defensive β€” one malformed row shouldn't kill the batch). - Return a new list; never mutate `rows`. - Empty input β†’ empty list.
✏️ Write your code here
🐍
Loading Python...
One-time download (~1 MB). Then it runs instantly.
πŸ“Š Result
Press Run to see result...

πŸ’¬ Discussion

Be the first to ask a question or share a tip.
Sign in to join the discussion. Reading is free.
Loading discussion…