H
11

I was writing the same print statement over and over until my friend in Seattle asked why I wasn't using a function.

I was manually typing 'print('Processing data...')' before every single step in my script, and after seeing my 50-line mess, she just pointed at the screen and said 'That's what functions are for.'
2 comments

Log in to join the discussion

Log In
2 Comments
cole_bailey85
Yeah, that "can't believe you ever typed the same thing ten times" feeling is real. @johnfoster gets it. It's like a light bulb goes off. You stop being a copy-paste robot and start actually telling the code what to do. Makes everything cleaner and way easier to fix later.
2
johnfoster
johnfoster14d ago
My Seattle buddy saved me from that same mess last year. Once you start using functions, you can't believe you ever typed the same thing ten times.
1