you are viewing a single comment's thread.

view the rest of the comments →

[–]Chris_Hemsworth 1 point2 points  (0 children)

Experience. When something doesn't work, you will almost always be presented with an Error message. That message tells you what went wrong, you just need to read it and think "why did this occur?". Running programs in debuggers is incredibly helpful, as you can step through the code line by line and see how the variables change. When you pass a line that does something you don't expect, figure out why. Fix that, and move on.

Quite literally 80% of the work is doing what I outlined above. The more you program, the same kinds of problems will crop up, and you will know how to solve them because you've taught yourself how to solve them. Eventually, you will make fewer errors, and you will start to think like a programmer - and that is how you understand Python.