r/learnpython • • 2d ago

I keep re-Googling the same basic Python stuff I already learned — does it ever actually stick?

I've been learning Python for a while now, mostly for my BCA coursework and a couple of small side projects, and there's this one thing that keeps bugging me.

I will learn something, use it once, feel good about it, and then a week later I'm staring at my screen Googling the exact same thing again. List comprehensions. How dict.get works. The difference between append and extend, again. It's like my brain just refuses to keep the small stuff.

The weird part is the bigger ideas stick fine. I remember how a loop works, I remember the shape of a project, but the little syntax details just slide right off. And every time I look it up I tell myself "okay this time I'll remember it", and then I don't.

I know everyone says Googling is part of the job and even experienced devs do it, but I'm starting to wonder if I'm actually learning or just getting really fast at searching. Do you eventually stop looking up the basics, or does it just become less embarrassing over time? Still not sure if I need to drill them more or just accept this is how it works.

2 Upvotes

25 comments sorted by

11

u/Warm_Letterhead3691 2d ago edited 2d ago

Honestly you're going to be doing this forever. Its just one of those things.

I've been writing python semi-professionally for like 4 years now and yesterday I had to look up how to make an empty list because I just couldn't think of it at the time.

Looking things up is just part of the job. Even senior devs with decades of experience haven't memorized everything and forget things too. Don't let anyone tell you otherwise What matters is thinking like a programmer and having problem solving skills, not being an encyclopedia of python information

3

u/acfot 2d ago

Honestly this is exactly what I needed to hear, thank you — the empty list thing made me laugh because that's literally been me with dict.get this week.

3

u/Warm_Letterhead3691 2d ago

Another thing I would add too is if you haven't heard of it before look I to a program called Zeal, or if you're in a Mac they have a version called dash.

It's offline documentation for basically any programming language of. You install zeal, then you download the full official python documentation and you can look up anything in it totally offline after the initial download. Once you get into things like Django, fastapi and other python frameworks they have docsets too

Faster than Google because you can literally type in dict.get and it'll pull up the official documentation for it. Plus it teaches you to read docs if you don't already. If you use vscode there's the dash extension that links to the app and lets you look up with a hotkey.

1

u/acfot 2d ago

Oh nice, I'd never heard of Zeal — having the docs offline sounds way faster than Googling dict.get for the hundredth time. I'll give it a try, thanks for the tip.

2

u/AlsonTeteuil-84 2d ago

knowing what to search for is like 80% of the battle anyway tbh.

3

u/johlae 2d ago

Take notes the next time you google. Keep one big text file in which you append each note. Use #subject, #description, #tags: a,b,c so that later on it's easy to search for by keywords. Each time you need to refer to your notes add some text to explain what's different in the new case.

1

u/acfot 2d ago

Fair point, I've never actually tried writing stuff down properly — might start a little cheat sheet for the bits I keep forgetting and see how it goes.

3

u/Popular-Being8956 2d ago

I will admit, it took me forever to learn the synatx for dictionaries.

It also took me a long time to remember the syntax to make a class.

The theory, the workflow, all that I internalized and understood pretty well. But the syntax? Man sometimes that just didn't stick even after lots of experience.

This is very normal

1

u/acfot 2d ago

Glad it's not just me then — dicts and classes are the two that trip me up most too, so I'll take the 'normal' verdict and run with it.

3

u/nboro94 2d ago

Once you start learning multiple programming languages it's pretty much impossible to remember the specific syntax for each one so that's normal. I've used list comprehensions in python for well over a decade, and right now I can't remember the syntax at all for it.

2

u/acfot 2d ago

Yeah, that actually makes me feel a lot better about it — list comprehensions are the exact thing I keep forgetting too, so it's good to know it's not just me.

1

u/SharkSymphony 2d ago edited 2d ago

I know a bunch of languages to a middling extent, and yes I have to go diving for some syntax and API specifics when I'm returning to a language I'm rusty in – but Python is a go-to language for me. Comprehensions and generator expressions for me are second nature, and I reach for them before for loops whenever I can. The syntax is easy to master – a list comprehension looks like a list! You can definitely get these under your belt – it just takes practice.

Kind of similarly, although I'm rusty in a bunch of Ruby by now, I remember the syntax of do blocks clearly – both syntaxes – because I've used and read them enough.

1

u/SharkSymphony 2d ago edited 2d ago

If there are bits you identify that you need to retain, you can use some of the same techniques you'd use for learning in any other discipline: make a note of which bits you're annoyed you had to look up again, and drill them.

For comprehensions, practice going over a list, a set, a dictionary, a sorted set (think about how you'd do this), a sorted dictionary (hint: this is going to be a comprension over the sorted keys of the dictionary). Add different kinds of filters. Write/type each one out from scratch – don't copy-paste. Extend to set comprehensions, then to dictionary comprehensions. Finally, try some generator expressions, and make sure you're very clear on the difference between them and list comprehensions. What happens if you try to print a generator expression?

For dict.get, drill all the dictionary methods you think are useful. First of all, make yourself a big nice dictionary with interesting contents – say, by loading from JSON. Practice giving your `get` different default values. Do regular dictionary access and observe the difference. Iterate by keys, by values, by items. Maybe start combining that with comprehensions to play with the different possibilities.

Finally, consider using spaced repetition. Do each review item a little bit each day until you feel like it's memorized. Then come back next week and refresh, followed by next month if necessary. You could even use an Anki deck to set this up if you want to go for more of a flash card approach, or you have enough review items that you want it to figure out what subset to look at each day – but I think actually writing them in code instead of drilling flash cards is preferable if you have time, not just for retention but to make sure you're using them correctly. Of course, you could always do both of you really want to go for the overkill. 😉

They say it takes something like seven times hearing a name before you remember it. It's a bit like that with code too sometimes. Keep at it!

2

u/acfot 2d ago

The notebook idea is a good shout, I hadn't really thought of that — I'll give the little drills a go and see if it sticks better than just re-Googling it every time.

2

u/LostInTheAether304 2d ago

Honestly, just go ahead and bookmark docs.python.org and add it your phones Home Screen.

2

u/Beginning-Passion439 2d ago

That’s normal. The ones you use a lot stick over time. I’d keep a little notes file of the ones you keep looking up, it’s quicker than Googling them again.

1

u/Mandelbrots-dream 2d ago

I'm redoing a guided project.

This time, I'm typing down notes. The stuff I know I'll need for my personal project is going in a separate folder. Each file is to deal with only one task.

If it doesn't stick, I'll have my notes. Honestly expecting every command to stick with exact syntax might be unrealistic.

1

u/Top-Cauliflower-1808 2d ago

You are learning fine. The loop shape sticking is the real skill and syntax lookup is just friction. Lean on autocomplete and a tiny cheat sheet for the three things you keep forgetting instead of drilling everything.

1

u/FooWho 2d ago

Back when I was a university student, I asked a question one time about some detail of a Linux system call. The professor told something to the effect of he wasn't sure because it wasn't something worth remembering, just use man pages if I needed to know the details.

Not everything is worth remembering and not everything worth remembering (even if you "know" it) is going to come to you when you try to recall it. The more frequently you do something, the more likely you are to remember it. It's sort of a self-selector for "this is one of the things worth remembering".

1

u/NotACoderPleaseHelp 1d ago

A drill I use to tell learning 3d artists to do is to build something using only what they know off hand. Do that once a week.
After a while you will find that what you know off hand will improve. Part of the trick of learning is to make the lesson memorable.

1

u/TheRNGuy 1d ago

You remember stuff you use a lot.

Nothing wrong about googling, too.

Your task is to finish software (with good code and without bugs), not to prove others you have best memory.

1

u/ZeroYDELTA555 16h ago

Yes, but here is the secret most people realize later: professional software engineering isn't about memorizing syntax, it's about problem decomposition and architecture.

Even senior engineers frequently check the docs for datetime formatting, regex flags, or `dict.setdefault()` syntax. What actually sticks with time is your mental model of *how* the data flows and *what* tool to reach for. The syntax lookup takes 3 seconds and is completely normal. Keep building projects and don't sweat memorization!