Five functions, five mental shifts. filter_high_spend, compute_cpl_per_campaign, find_first_over_target, group_by_channel, channel_summary. Which one landed hardest?
Honestly, the for c in campaigns moment on Day 11 hit different. I kept waiting for the row number and it just... wasn't there. Python gave me the whole dict. I didn't need a number.
That's the exact instinct to hold onto — you're iterating the data, not the positions. What about the while loop on Day 12?
The break felt wrong at first. Like I was cheating. But find_first_over_target only needs the first match — why loop through all forty rows once you've found it? That's not lazy, that's correct.
"That's not lazy, that's correct" — I'm putting that on a t-shirt. And the dict moment?
"Dicts are just Salesforce records" — once you said that, group_by_channel was obvious. I'm looking up a field by name, not by column position. setdefault is basically IFERROR for keys that don't exist yet.
Six questions from this week and Week 1. These five functions are your collections toolkit. Let's confirm they're solid.
Five functions, five mental shifts. filter_high_spend, compute_cpl_per_campaign, find_first_over_target, group_by_channel, channel_summary. Which one landed hardest?
Honestly, the for c in campaigns moment on Day 11 hit different. I kept waiting for the row number and it just... wasn't there. Python gave me the whole dict. I didn't need a number.
That's the exact instinct to hold onto — you're iterating the data, not the positions. What about the while loop on Day 12?
The break felt wrong at first. Like I was cheating. But find_first_over_target only needs the first match — why loop through all forty rows once you've found it? That's not lazy, that's correct.
"That's not lazy, that's correct" — I'm putting that on a t-shirt. And the dict moment?
"Dicts are just Salesforce records" — once you said that, group_by_channel was obvious. I'm looking up a field by name, not by column position. setdefault is basically IFERROR for keys that don't exist yet.
Six questions from this week and Week 1. These five functions are your collections toolkit. Let's confirm they're solid.