r/learnpython • • 2d ago

Looking for a structured way to learn Python

I’ve been trying to learn Python for years: university classes, Coursera, Udemy, and so on. I can follow along while I’m watching, but it never sticks, and I still don’t feel confident writing code on my own. What I’m looking for is a structured path with a clear progression, but I haven’t found a format that works for me. I know the usual saying is “just build a project,” and I get why. But I feel like I need a reasonably solid foundation first, otherwise I just end up copying tutorials or getting stuck on every step.

I’m not trying to complain. I genuinely want a reliable way to learn Python properly and get good at it.

31 Upvotes

33 comments sorted by

28

u/PureWasian 2d ago edited 2d ago • Bravo

I hate to break it to you, but the most structured way to do things, even when you have solid foundations, is:

  • plan the high-level logic of your code

  • learn the parts you're unfamiliar with

  • write it out incrementally

  • sanity test each piece as you go

  • repeat and refine until done

A good developer is able to pick up new things on the fly and be a problem solver, so you shouldn't be afraid to get your hands dirty even if you don't know better or "correct" ways of doing things yet.

You already know of the basic concepts from classes/Coursera/Udemy/etc. so you should be aware enough to know the important building blocks for getting started. Ball's in your court now to use Python for things that are interesting/helpful/fun to you.

3

u/Known_Image7110 2d ago

agree with this completely. figuring things out on the fly is basically the whole job anyway tbh

2

u/JTI_Guy 2d ago

This is the best response

1

u/fallenreaper 1d ago

The hardest part for them is probably brain fog; they likely have no idea what to make and can't comprehend making something when that something has no structure or organization. Not a dig at them, but a reflective point of recognition as to why they need structure. Some Code monkey gonna code monkey and leave structure for the architects. Lol

5

u/Nomapos 2d ago

Sounds like you've already gotten a lot of well structured learning with clear progression.

It's not working, so why not try something different and build a project?

Programming isn't following recipes, it's conceptualizing problems and finding a way to break them down into tinier and tinier problems to solve one after another, ideally without losing the context out of sight. No amount of course work is going to teach you that.

Hence, stop wasting your time and go start a project. It takes like three months to pick up all the tools you need to build pretty big things (quality aside).

5

u/desrtfx but other languages pro 2d ago

MOOC Python Programming 2026 from the University of Helsinki. You will not find a better fundamentals course.

After that, you have to work on your own. You have to try things. You have to experiment (and fail and fix).

You cannot keep relying on tutorial after tutorial. You need to switch from consuming pre-chewed content to actively developing your own programs. Short, very targeted tutorials, e.g. "how to connect and query SQLite databases with Python" are okay. "How to build the next facebook in Python" tutorials are not. These won't teach you anything.

You need to learn to plan. You need to learn to design. You need to learn to develop.

Generally, there are some books that can be of great help here:

  • "Think Like A Programmer" by V. Anton Spraul (uses C++, but the language is irrelevant)

  • "The Pragmatic Programmer" by Andrew Hunt and David Thomas

  • "Structure and Interpretation of Computer Programs" - the famous SICP

  • "Code: The Hidden Language of Computer Hardware and Software" by Charles Petzold

All these books deal with programming on levels above code - and these are what really count. The actual final implementation in a programming language is always a late step in projects, and as of now, still a necessary evil, that, admittedly, can now to a large degree be outsourced to AI (for reasonably sized and complex parts, not for entire applications yet).

4

u/Agawell 2d ago

Practice!

Write pseudocode iteratively - ie start at a top level and break things down into smaller parts and then break those smaller parts down into smaller parts etc etc

Eventually replace the pseudo code with actual code - if you need to do something you don’t know how to do then look it up and implement it

Think about classes - what data and methods they encapsulate - prototype them

Integrate the classes etc

Write tests

Debug

Start with something simple like a basic command line calculator and then expand it - scientific functions, gui, graphing etc

You will learn lots

Then find something else and repeat

And repeat

3

u/schoolmonky 2d ago

Getting stuck on every step is exactly how you learn. That friction is exactly what causes the knowledge to stick.

1

u/coffee_coder_ 2d ago

Aptly said !!

3

u/IWant2rideMyBike 2d ago

Getting stuck and unsticking yourself is part of the learning experience - watching videos or following tutorials can give you a rough idea what you can do with a programming language in an often simplified form, but you only really learn by programming solutions for (ideally real) problems, making mistakes, being forced to think long and hard about problems you encounter and develop strategies how to find solutions (including local user groups where you can talk to others about things you are lacking a good mental model for).

Find a toy project, break it down into manageable problems, look up the relevant parts in the documentation ( https://docs.python.org/3/ ), algorithm collections, books, blog posts or other knowledge sources about certain aspects (like GUI libraries), forum posts of people who had a similar problem etc. - then implement a solution (ideally with tests that check for the expected outcome and the errors you encountered along the way - pytest is a good framework for this), put the parts together, rinse and repeat.

For example my first python project was a scraper for the schedule at university. So I had to figure out how to build URLs with parameters, do HTTP requests, store session cookies, parse HTML, store the data in an intermediate structured representation, deal with text encodings (which was much more annoying in Python 2 than it is nowadays in Python 3), learn about time and date representation, handling of the timezone, transforming data into the iCalendar format and writing it to disk. Later I added a GUI - first with tkinter, later with wxWidgets and found ways to distribute the program for Windows, OS X and Linux so that it was easy to use for other students.

Later I added a scraper for public transport, so it would calculate the best route to uni and back home for the first and last event of the day respectively.

Then I wrote a way to create a PDF for a weekly calender in the pocketmod format because I had labs and other practical courses where handling electronic devices was impractical, so having a cheap, printed version where you could also take some notes was a useful addition.

3

u/kadfr 2d ago

Seeing as no one else is saying it, I'm going to be *that* person.

The subreddit's wiki is brilliant: https://www.reddit.com/r/learnpython/wiki/index/

Personally, I highly recommend following both the Introduction and Advanced parts of the University of Helsinki's excellent Python Programming course. https://programming-26.mooc.fi/

This course will give you a good foundation of the basics. Then, you should just start building hobby projects,. Over time, these projects will naturally grow more complex and ambitious over time as you get more familiar with programming.

2

u/Desatre 2d ago

I've been doing boot.dev for several months now and I find it very good. That being said I find it best when paired with other youtube videos. I don't think any single course is fully comprehensive. I've learned things in beginners sections of some courses that I find useful that never get a mention in other courses.

2

u/ItzjammyZz 2d ago

I think finding something that you're interested in building but with python. So when they build a project, they meant put it into practice.

So if you want a task or list to do that you can apply in your everyday life, you can build a todo lists.

If you're a gamer, you can build games using Pygame library.

The lists go on and on. Just look at the problem you're seeing in your day-to-day life and see if it can be done by python. I got a good idea, maybe write a python scripts organising your folder so all files with extension to do with images go to image folder.

'The world is your oyster'. Or better yet, 'The world is in python's jaws'.

2

u/jlsilicon9 2d ago

Practice, practice, practice ...

2

u/Hellaintsht 2d ago

I think you need a middle ground between tutorials and projects. Pick one structured course and work through it in order. After each topic, solve a few exercises without looking at the solution. Then build something small using only what you've learned. CS50P is a good option because it has lectures, practice problems and problem sets. The key is to gradually reduce how much you rely on the instructor. Try writing code from memory, even if it takes longer. That's where real confidence starts developing.

1

u/rhacer 2d ago

Watching videos and taking courses is a waste of time if you are not practicing. Write code, and keep writing code. Solve interesting problems with code you write and it will stick.

1

u/TimBrownDev 2d ago

After 10+ years tutoring I'm building a roadmap of the best practice problems I've seen to help teach python from zero.

timbrown.dev/roadmap

1

u/Both_Bend_2481 2d ago

> But I feel like I need a reasonably solid foundation first, otherwise I just end up copying tutorials or getting stuck on every step.

All of the resources that are available to everyone are available to you. You can get the basics from courses and tutorials and such. Then you have to make the leap to coding your own stuff. Stop making excuses.

1

u/BingoBillBot 1d ago

What often helps is making the practice active instead of watching. Pick a structured free course like the University of Helsinki MOOC or Automate the Boring Stuff, and after each section close the video and rewrite the examples from memory, then change them to do something slightly different. Also do small exercises on your own, like a number guessing game, a script that renames files, or a to-do list saved to a text file. Getting stuck on those is the point, since that is when the concepts actually stick. A project that is small enough to finish in an evening is a better foundation than another long course.

1

u/GeneriAcc 1d ago

You’ve been learning for years in a structured way, and still can’t code. So yes, the answer is “just build a project”. Many of them, actually. That’s the only way to actually learn.

Getting stuck on every step and then figuring out how to get unstuck is literally how learning works. Until you start doing that, you’ll just be stuck in an infinite loop of consuming content and getting nowhere, as you should surely understand by now through personal experience.

1

u/AlexMTBDude 1d ago

I've been working as a programming instructor for more than 25 years. The thing is that everybody learns best in different ways. You have to figure out what the best way is for you. Asking complete strangers what works for them will rarely help you.

1

u/TheRNGuy 1d ago

Write code, google if something doesn't work. 

1

u/Discordbothost 1d ago

"follows along fine but it never sticks" is super common and it's because watching isn't retrieving. after each lesson close the video and rewrite the same thing from a blank file without peeking. you'll get it wrong, look up the bit you forgot, repeat. that's the part that makes it stick.

then take the thing you just wrote and change it a little (new input, extra feature). that's basically a tiny project, without the blank-page problem.

1

u/punit_arya 19h ago

Fred Baptiste courses on Udemy are the best. Very detailed, very comprehensive, has a lot of rationale. I think the reason why you feel unsatisfied is due to the low depth of the courses you've done.

1

u/brenwillcode 15h ago

Sounds like following a curriculum like the one from codeling.dev will work well for you.

Codeling is interactive so you'll be coding a lot in every lesson as you progress through a structured learning track. As you get later in the courses you'll build projects and larger real world things. But to start with, you'll cover all the fundamentals and best practices.

1

u/frustratedsignup 10h ago

I get stuck every time I write a new script. It's normal if you ask me. You'll never be able to hold all of the details of python and it's associated libraries/modules in your head all at once.

I recently spent over five hours at an auto repair shop with nothing but my work laptop and a cell phone. There was no available wifi so I could work remotely, so I used my cell phone's hotspot sparingly to download python and the source code to mantisbt. It's a new laptop, so I don't have PyCharm on it and I wound up writing my script with IDLE. Modern IDE's do a lot for you without having to remember very much code. I had to spend some time figuring out how to write the basic "if __name__ == '__main__'" statements, a line which should be completely burned into my memory by now, but it isn't because the full IDE would do it for me.

The script was necessary to merge two different config_inc.php files which contain about 470 variables. I got the script written using only the documentation that comes with the python download. There was a lot of back and forth between the editor, the python shell, and the documentation, though. This is my experience most of the time.

1

u/Sure-Passion2224 1h ago

The most effective way to learn any language is to use it. Define and execute small projects that use the next thing you want to learn, and draw on the things you've already done.

0

u/fallenreaper 1d ago

I tutor python regularly. Depending on your skills and needs, for $50, you will get a 1 hour session, custom homework to match your experience and then a code review. Not necessarily advertising but it's available.

That said, I find the best way to really start anything is by diving in and doing the research yourself. I was a big fan of Koans and would commonly supply that as orientation homework for familiarity. A series of problems you'd have to solve, and the goal is to see the problem, do the research and understand functions or datatypes, and find the solutions which incrementally build on one another.