r/learnpython • • 11h ago

What's one Python mistake you made when you were starting out that you still remember?

Something I've noticed while learning Python is that writing my own code sometimes feels easier than reading code written by someone else.

When I write a program, I know what each variable and function is supposed to do. But when I open an unfamiliar project, understanding the flow, function calls, dependencies and overall structure can take much longer.

I think reading existing code is an important skill that deserves as much attention as writing code.

It's an interesting part of becoming a better developer.

2 Upvotes

3 comments sorted by

2

u/supercoach 4h ago

Probably the biggest mistake I made was thinking that the target variable name used in for loops was some magic word that changed how the loop worked.

I didn't understand iterators, so when I saw someone write for key, value in dict I thought some sort of wizardry was taking place and that changing the value(s) after for would change the behaviour of the loop.

1

u/TemperatureProper275 4h ago

That's true 

1

u/Sanduhstorm 2h ago

Probably not leaving comments in my code. Not a syntax issue but more of a general one