r/learnpython • • 17h 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.

22 Upvotes

28 comments sorted by

View all comments

2

u/jmaroszek 17h 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. pytest alone 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.

1

u/memeaste 17h ago

I do actively write code at my job, but it's more on the file movement and report creation side of things. While refreshing myself with Python, I actually ended up writing a Pokemon battle, which is fun. Nothing too advanced, just type advantages and effectiveness. Aside from that, I don't think I'm creative enough to think of my own projects. I recently came across roadmap.sh that has some suggested programs I can write. Not sure how effective those are.

2

u/jmaroszek 16h ago

Have you heard of Automate the Boring Stuff with Python? If you are interested in file movement and automation, that is a good resource that will teach you some fundamental concepts as you work through it. I haven't done any courses on roadmap.sh before, but I looked at the path for something I know about (data science), and the topics at least look right. And if you don't feel creative enough to work on projects you want to do, you could try claude code or codex for a month, and ask it to help you understand the code it writes, rather than simply move on after you get the app working. You can go surprisingly far with vibe coding these days. The trick is to not let your app outpace your understanding of it.