Last week you formatted one invoice line beautifully. But you have six clients. What does your current workflow look like for all six?
Open six documents. Copy six sets of numbers. Run the formatting six times. It is the same operation, six times in a row.
That repetition is the tell. A list holds all six client records; a for loop runs your invoice function on each one without you touching a single cell. The ten-minute monthly tab-switching ritual becomes one function call.
So by the end of the week I can take a list of client dicts and get back a list of formatted invoice lines?
Exactly that. Day 10 filters clients by minimum hours. Day 11 loops to compute totals per client. Day 12 finds the first over-budget project with a while loop. Day 13 groups clients by status. Day 14 builds a nested summary with totals, revenue, and average rate per status group. By the end you have the aggregation that replaces your monthly review spreadsheet.
filter_active_clients: filter a list by a threshold using append and incompute_totals_per_client: iterate with a for loop, compute rate * hours per clientfind_first_over_budget: use a while loop with break to stop at the first problemgroup_by_status: accumulate into a dict keyed by project status using .get() and .items()status_summary: nested aggregation — totals and averages per status groupGoal: by Friday one loop replaces six manual tab-switches.
7 lessons this week
Last week you formatted one invoice line beautifully. But you have six clients. What does your current workflow look like for all six?
Open six documents. Copy six sets of numbers. Run the formatting six times. It is the same operation, six times in a row.
That repetition is the tell. A list holds all six client records; a for loop runs your invoice function on each one without you touching a single cell. The ten-minute monthly tab-switching ritual becomes one function call.
So by the end of the week I can take a list of client dicts and get back a list of formatted invoice lines?
Exactly that. Day 10 filters clients by minimum hours. Day 11 loops to compute totals per client. Day 12 finds the first over-budget project with a while loop. Day 13 groups clients by status. Day 14 builds a nested summary with totals, revenue, and average rate per status group. By the end you have the aggregation that replaces your monthly review spreadsheet.
filter_active_clients: filter a list by a threshold using append and incompute_totals_per_client: iterate with a for loop, compute rate * hours per clientfind_first_over_budget: use a while loop with break to stop at the first problemgroup_by_status: accumulate into a dict keyed by project status using .get() and .items()status_summary: nested aggregation — totals and averages per status groupGoal: by Friday one loop replaces six manual tab-switches.