PSA: My code went from 200 lines to 40 after I finally learned what a function was
Took a free Intro to Python class at the library in Austin last month and now I'm wondering if new folks should learn functions on day one or grind through loops first, what do you all think?
Learning functions early saved me so much time when I was starting out. I spent weeks copy pasting the same block of code over and over in a little dice game project, and once someone showed me how to wrap it in a def and just call it, my file shrank by half. Loops still matter, but you can teach those inside a function pretty easy, like a loop that rolls dice inside one. So my vote is functions first, even just the basics.