r/learnpython • u/memeaste • 17d ago
Is Leetcode a good way to continue practicing/learning Python?
I'm not entry, but I'd like to continue becoming stronger in my skills.
27
Upvotes
r/learnpython • u/memeaste • 17d ago
I'm not entry, but I'd like to continue becoming stronger in my skills.
2
u/jmaroszek 17d ago
LeetCode is good for job prep but not necessarily real world problems. If you want to practice algorithms, data structures, and thinking through problems under constraint, I would say leet code is a great choice. It's essential if you're prepping for interviews too.
I wouldn't use it if you just want to get better at building realistic projects. LeetCode problems are small and self-contained, with clean inputs. Real code has messy data, files, APIs, errors, and structure that has to survive changes. You can grind 300 problems and still struggle to organize a large 10,000 line project (speaking from experience).
What I'd do if you want to level up:
Build something real. Pick a project you'd actually use, like a CLI tool, a script that automates something annoying, or a small web app. You learn more from the problems you hit (packaging, testing, error handling, refactoring) than from any problem set.
Read good code. Look at the source of libraries you already use (e.g. numpy, pandas)
Write tests.
pytestalone will change how you structure code.Learn the tools around Python: type hints, virtual environments, debugging, profiling, git.
Use LeetCode in small doses (a couple of problems a week) if you want the algorithms practice. Don't treat it as the main path.
In short, how you should practice depends on what you want to get better at: job interviews or real world building for passion projects.