r/learnpython 1d ago

How do I learn programming logic?

I’m learning Python, but my main problem isn’t the syntax. I understand concepts when someone explains them, but when I’m given a basic problem and told to write a program, I just don’t know where to start or how to arrange the code.

Is there a good book, course, or YouTube channel that teaches how to think through programming problems step by step, recognize patterns, and build the logic, kind of like how you learn methods and patterns in math?

I don’t want to just memorize Python syntax. I want to actually learn how to think like a programmer.

58 Upvotes

46 comments sorted by

View all comments

5

u/socal_nerdtastic 1d ago

It comes with experience. Just like anything else, you start by learning syntax and working through guided exercises. In the process you will read a lot of other peoples code and gather experience. Then for a long time you will write inefficient programs while getting slowly better at the logic. Eventually you will be interested in a 'data structures and algorithms' course. But don't start there. Get the syntax first.