F
22

Just realized I spent months writing way more code than I needed

When I started learning Python, I'd write these huge blocks to check lists for items... like 10 lines with loops and flags. A month back, I saw someone use 'if item in list:' in a tutorial. It's one line. I felt so silly for not knowing that basic thing existed. My old scripts are full of that extra stuff. It's cool how a simple built-in feature can clean everything up. Has anyone else had a moment like that with a basic command?
3 comments

Log in to join the discussion

Log In
3 Comments
jadej50
jadej5015d ago
Welcome to the club, we've all built a cathedral when a shed would do.
4
alicecraig
alicecraig15d ago
It's just human nature to overcomplicate simple things, isn't it?
4
jamesf29
jamesf2914d ago
But what if the cathedral is the whole point? Sometimes that extra work leads to a better, more lasting result. A shed might do the job, but it doesn't feed the soul.
2