Keeping what you've learned
I used to scribble a ton of stuff in the back of one of my old Commodore64 manuals. Whenever I’d find something cool in a magazine or book, or later, text files, I’d scrawl it in. There was something about it being a bit messy that made it easier to remember. These days, there’s a ton of different ways to do that online or in files, but most smart coders I know just go and look up their own code. i.e. things they’ve done previously.
One of the coolest things about working out a good way to do something in code, is that you can go back whenever you need to do that. A classic example could be a script that reads lines from a file and makes some change to every line, before writing out a new file. That’s the type of thing that you’d probably find yourself wanting to do for lots of scripts, so you’d probably keep that script. You’ll probably keep improving the script as you get better at coding and come across more ‘gotchas’ that can be avoided by wrinting better code.
Another way of remembering things is to recognise and remember patterns, or idioms. Idiomatic Python has been a really good reference for getting things done in Python, using consistent and practical structure. It’s not the only way to do things, but has some logic reasoning behind it. Although there’s a ton of information on the Internet, there’s also a lot of bad information, so you really have to sift through to find the good information. And before you ask questions on forums or places like Stack Overflow, make sure you’ve put some effort in and done some hard searching first. People tend to help those who put in the work, rather than those who ask before trying. And if this doesn’t work, sometimes the edited structure of a good book can be very helpful as well.
Something that will also help, is to just keep at it. Forcing yourself to push through tough problems and finishing projects will really train your brain and make things a lot easier to learn in the future. Collaborating can also be a great way to learn, since the load is spread over more than one person, and decisions are sometime easier to make as a group.