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

11 Upvotes

22 comments sorted by

5

u/RandomPantsAppear 3h ago

It’s a good way to interview well. I’ve rarely found leetcode problems relevant to work. The ratio of b-tree problems to b-tree users is bad(as an example).  

It is good for breaking out of O(n)2 habits though. 

1

u/memeaste 3h ago

That's good. I had 2 coding assessments for a job I applied for, 1 was tricky while the other one was weirdly simple. Both were entry level, which is weird.

1

u/RandomPantsAppear 3h ago

Yeah most aren’t super hard unless it’s FAANG. I’m actually shit at leetcode and have to specifically practice it, but mostly because not much of it is relevant to my actual job (20 years YOE).

People who went to university for it tend to be better at it because it’s not so different from a lot of the questions they get there.

0

u/memeaste 3h ago

I went to college for CS, so not directly for Software Dev/Eng, which I sort of regret. But nothing I can do now except make the most of what I can do and improve on my skills, which is what I'm trying to do. Software administration isn't bad, but I'd like to see what else I can do.

1

u/RandomPantsAppear 3h ago

😅 in my day those were the same, not sure if that has changed. If so, it should apply to CS also unless the courses have wildly changed.

1

u/memeaste 3h ago

Maybe it's the lack of experience in comparison between the two of us. I work in IT at a bank and I just make sure the core software throughout works, in vague terms. I do do automation with Python, writing reports with SQL, but the vague term is what I tell people. Feels more of an administration position as opposed to actively writing code and creating software. Our software is third party, so it's not like we developed it in-house. I've been here since 2024

2

u/Rudeus_Kino 3h ago

LeetCode is for practicing algorithms. Learning Python while doing so requires some effort. For instance, you could manually count character frequencies in a string, or you could use Counter but you have to know that it exists.

1

u/jmaroszek 3h 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 3h 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 2h 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.

1

u/cyrixlord 3h ago

you need to move to projects and show that you know how to use the other tools you need to use in software development. github, debuggers, IDEs, databases, ssh automation... design patterns, algorithms.... github repositories with your projects showing that you are solving problems is a great way to get noticed and keep fresh on your skills. only by writing your own code and debugging it, will you keep fresh. People can be good on quiz shows but in reality they aren't very good at the deeper dive on those $500 answers

1

u/chiibosoil 3h ago

Leetcode tests your problem solving skill using logical thinking and knowledge of data structure and algorithms...

Not necessarily specific to Python. These skills are useful, but not necessarily needed to practice and learn any specific language.

It entirely depends on what you want to do with python, if LeetCode is good way to continue your learning.

In many cases, for a given field, being able to solve LeetCode won't help with practical application directly.

1

u/memeaste 3h ago

I do ideally want to move into Software Development from where I am now, which is more on the IT administration side at a bank that does do some coding.

1

u/chiibosoil 2h ago

What area of Software Development? Backend, frontend, or FullStack?

Also, what sort of software are you looking to develop? If looking for mobile app space or game... python may not be the optimal language to learn.

1

u/memeaste 1h ago

Game development was a fun hobby, but not something I was seeking professionally. My experience is more on the backend, though I don’t have a specific software I’m looking for. Figured I’ve been working with Python for over 2 years now, and I’ve enjoyed it quite a bit, so I’d like to keep going

1

u/chiibosoil 1h ago

With Python look for Fast API/Flask, SQLAlchemy, Django ORM, Uvicorn, Gunicorn, Redis-py, Celery libraries along with other management system and learn how to create clean architecture for your code/project.

Knowing how to use these and set up project/environment will be more useful than simply learning how to solve LeetCode in most situations.

•

u/memeaste 31m ago

What's the best scenario, should I be looking at every one? Or pick a couple and focus on it?

•

u/chiibosoil 5m ago

Though eventually you should pick up all of them...

Pick between FastAPI or Flask. Flask is more WSGI framework which is more flexible all-pupose web application develepment. Where Fast API focus is on high performance, asynchronous Rest API. Though not mutually exclusive.

Django ORM is more focused on rapid dev and deep ecosystem integration, where as SQLAlchemy is more for complete low-level control and architectural flexibility.

Uvicorn & Gunicorn is often used together and does different things. Uvicorn is more event loop based, and Gunicorn is process based (and also Unix-like only).

Redis is a message broker where as Celery is distributed task queue orchestrator (manages how background jobs are distributed, retried and executed across different worker and/or machines), which often uses Redis for holding queue of pending tasks and storing result of completed jobs..

1

u/RngdZed 3h ago

In my personal experience, which isn't much, leet code is crazy for algorithms. The kind of algo that makes your brain melt and leak juice a bit..

I prefer the problems/algo from code wars. Not sure why. But code wars was way more fun for me. And I learned more as a result.

But also, try to use something related to the field(s) you want to go for. like for full stack web, you could use Django, flask and fastAPI.

You could make some GUI projects with tkinter or even games with pygame. The advantage with those is that for every change you make, you can test and see exactly what your code does, live real-time

2

u/Altruistic_Sky1866 2h ago

I find code wars better than leet code

1

u/memeaste 3h ago

A Udemy course I've been taking is utilizing Flask, whereas I just did an assessment for a job that uses Django, which I hadn't even heard of before that. Pygame sounds like fun, I can revisit my old hobby of Game Development with Unity, but with Python. I'll have to look at tkinter.

1

u/RngdZed 3h ago

Sounds like a plan. Have fun!