Skip to main content
Image

r/learnpython



Work with your tools, in your environment. Codex for Windows, available with ChatGPT.
Image Work with your tools, in your environment. Codex for Windows, available with ChatGPT.


I spent months learning Python and only today realized I've been confused about something embarrassingly basic
I spent months learning Python and only today realized I've been confused about something embarrassingly basic

I've been writing Python scripts for a while now. Nothing crazy, just automating small stuff, scraping some data, making my life a little easier. I thought I had a decent handle on things.

I was looking at someone else's code and they used a list comprehension in a way that made me stop and read it three times. I realized I had been writing loops the long way this whole time not because I didn't know list comprehensions existed but because I never really trusted myself to read them when I wrote them fast. I kept defaulting to the for loop because at least I could trace it line by line without second-guessing myself.

I don't know if this is a common thing but I feel like there's a version of learning where you know a concept exists, you've seen it work, you've even used it a few times, but you haven't actually internalized it. You're kind of faking fluency in that little area. I was doing that with list comprehensions, with zip, with a few other things I won't list here because it's already embarrassing enough.

Once I wrote out ten examples by hand tonight it clicked in a way it hadn't before even though I'd "learned" this two years ago.

Anyone else have a concept they thought they understood for a long time before actually understanding it?