r/learnpython • • 11h ago

How Do I Actually Learn Python?

I’m sorry, this is probably a really dumb question but I’m picking up python as a hobby to learn between work and classes. I’ve never coded before and I’m not interested in doing it career-wise or anything like that. I just want to be able to understand the fundamentals of it. I’ve gone through many online courses as well as YouTube tutorials. I always get it in theory, when they explain the strings, integers, and whatnot, but when I actually go to write lines of code, I always find myself getting error codes, even when I follow the tutorial exactly, which honestly baffles me.

Does anybody have any tricks on how to deal with this learning curve? Something that might be extremely common knowledge to everybody else that I’m missing? Or any resources they could provide? I really want to learn how to code, I’m just not sure how I begin troubleshooting something that I don’t understand, if that makes sense.

16 Upvotes

55 comments sorted by

View all comments

3

u/stepback269 7h ago

This is an often repeated question. (example here)
Here's the answer:

Code comes last.

That's right. You shouldn't try to solve the problem by immediately dumping some code onto your blank slate. There's a lot of "pre-production" thinking and planning that has to come first.

Imagine that you are thinking of producing a movie.
Let's say it's based on a novel that's already been written.

You can't just start filming.
Much planning has to go into the project well before you press the record button on your camera.

You have to "storyboard" the project first.
In what kinds of locations will the filming take place.
Which actors will be in each scene? How will they be positioned?
What support resources will you need?
What sequence of events is to take place at each scene?

IT'S THE SAME FOR PLANNING TO WRITE CODE !!!
What sequence of events is to take place at each phase of the program?
What support resources will you need?
Who are the actors? (Usually a human user --but not necessarily so)
... and so on

P.S. edit::: Here's a better search result: Storyboarding for Programmers