r/learnpython • u/Glittering-Olive-404 • 16h 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.
11
u/xselliehx 16h ago
hey :) fellow python student here! :) i actually had the exact same problem and what solved it for me was CS50P lectures from Harvard. David Malan is MARVELOUS teacher and the most important part is not to watch it through youtube as that is theory / not you doing the practicals. Do it via their own website or via the edX website (can be for free, just dont require the certificate) and then you have all the problems for you to solve, they go from easier to the more challenging ones etc. What was very helpful was their own chatbot, small duck that actually doesnt give you the answer right away, but leads you towards the correct solution so you have to solve it. Very very helpful! :) one of the best advices i got was to actually start coding even if i dont know much. They are doing it in their own VS Code so then the transition for your own possible projects is not that challenging :) hope I helped at least somehow, enjoy your study of python!
9
u/Available_Safe1818 16h ago
Stop using videos, and write your own code. Learn to use Google.
3
u/SharkSymphony 16h ago
Errors are a major part of every programmer's existence. You have to learn to think the way the computer thinks. This is an essential part of the learning process!
What error are you getting? What code are you typing?
2
u/JaguarMammoth6231 16h ago
Getting errors is normal. You just need to read the error message, understand it, and fix it. Start with the first one, later errors might go away once you fix the first one.
2
u/mc_pm 13h ago
Are you actually typing in code and trying to figure out why it isn't working? If not, then you're not really learning python.
Learning to program by watching videos is like learning to drive by watching videos. You can get the basic idea, but until you're actually there and doing it, it's not really all connecting.
2
u/av8rgeek 11h ago
To really learn it, you need to code in it. Not just watching videos to learn the concepts. Find a project and code it WITHOUT USING AI.
1
u/rhacer 16h ago
I would read or watch a "getting started" video, then start solving problems. Watching or reading won't make you proficient, doing will.
1
u/Blumcole 14h ago
I'm also doing it as a hobby. I used the book Python Crash Course and I learned the fundamentals like that. And then maybe lock into a project that you want to make. For me it was a document renamer (for work) and a small database for tracking games. So you can use some libraries like tkinter, json, os,... I guess just Follow along with some tutorials or guides online, consult ai to explain some of the concepts. I also use a jupyter notebook to write down snippets of code.
1
u/Outer_Space_ 13h ago
If you like idle/incremental games, I can't recommend 'The Farmer was Replaced()' enough.
It's an automation game where you write code to control a drone to plant and manage crops. The coding is essentially python, there's internal documentation, and the progression really hammers home foundational concepts step by step.
1
u/desrtfx but other languages pro 12h ago
Stop youtube tutorials that give you the code and only make you retype it. They are useless.
Do a proper course: MOOC Python Programming 2026 from the University of Helsinki. Free, textual, extremely practice oriented and a proper first semester of "Introduction to Computer Science" course. The course, contrary to most tutorials does not give you the code to retype/copy but instead gives you the tools and makes you, the learner, develop the solution and implement it in code.
You need to program, which means that you need to develop everything from a given problem, to an algorithmic step by step solution for the problem and its sub-problems, that then, finally, can be implemented in code. Code is a late step in programming. It is not the beginning.
There are two things to unpack.
ais not the same asAin many programming languages (there are case insensitive ones, though, but Python is not one of them).Trueis not the same astrueand so on.1
u/AlieMay525 8h ago
For me I was at a point I thought I’d never actually learn without using like 10 resources and even then I didn’t get it and felt stupid. 1.5 years later I’m timing myself on how fast I can code. Practice is the best way. And once you get it, the error messages make sense and the fix’s make sense too. And over time you’ll find yourself just kind of doing it and then only occasionally referencing a resource.
I am in college as a computer science major and I feel like that might be easier as I also was able to learn the process of how you come up with codes and using pseudocode as well. I originally went back to college because I wanted to learn coding for making mods in video games. Just keep practicing.
1
u/BotSlamminDayNNight 8h ago
looks like you're actually not getting it in theory. if you did, you'd know how to avoid most if not all the error codes, and the few you might get wouldn't baffle you.
given that the many online courses and youtube tutorials haven't helped, you're right to look for something else. have you tried old school, ie. books?
3
u/stepback269 13h 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
1
u/unhott 16h ago
hey buddy, we all get errors. you just gotta read them and research why it might happen.
1
u/EnvironmentalDot9131 14h ago
Thats a great waya
1
u/pythonQu 12h ago
I was once like you.Didnt think I could code and I looked at everyone else who could as having magical powers.
I learned Python with Eric Matthes Python Crash Course but you gotta do hands on exercises. Get comfortable with being uncomfortable, try to code everyday.
Once you get the basics, do Free Code Camp Python track since that'll test your theoretical knowledge by going through more in depth hands in exercises. Thats what I'm doing now and it's made me stronger.
Trust me, a year ago I didnt/couldn't pass one of the super fundamental exercises and now I'm 40% of the way completed through the track.
1
u/MrAngel2U 9h ago
I gave AI a prompt. Something like.... Teach me like im a young student in the 80s with no experience wanting to learn the foundations of programing; and pencil and paper approach before things get complicated.
It worked for me. Everyone has a different learning style.
1
u/kayonred 9h ago
I'm self taught in programming-java. No one has ever guided me or helped me outside the resources I used,books mainly. Moreover,I have the disadvantage of being in a third world country with poor power supply and poor internet. For education my degree was in accounting. I wasn't pressured to learn programming. I was curious and simply wanted to know. What I did was: read many books, type in code compile, get it working. Continue reading, Continue practicing, wonder when I'd be able to create real commercial grade software. As u can see,I operated under a false assumption- that more knowledge would mean professionality and worse,that software would build itself. Also,I thought all software were written at a sitting, but i kept trying. Another misconception was that reading a book from cover to cover would mean I understand all the topics in it. Wrong
I wrote small programs along the way, then 3 years in,an event happened that marked a milestone in my learning. My handheld calculator died, it was a pemdas calc, and I thought, I've been programming for all these while,why not write it? It was a scary thought, but I took up the challenge, I knew nothing about languageceesign or compiler theory and it's lingo but after much sweat- no help anywhere,I was able to create it all from first principle. So what's the point, you don't have to know everything and get it all right before you begin. 2. Write programs. Write little programs that interest you alongside those the tutorials dictate. 3. You learn by doing, building stuffs and taking them apart. You need a curious mindset, a desire to know how things work an explorative mindset.
2 dec26
1
u/dnswblzo 8h ago
Look at the wiki for this subreddit, it has lots of resources:
https://www.reddit.com/r/learnpython/wiki/index
1
u/Danizn_2004 7h ago
Hola yo creo que podrías empezar a leer el libro amarillo de python donde sale una serpiente es un buen libro, como para un nivel intermedio-avanzado ya que te da las bases, lo leo cada que tengo tiempo, pero la verdad es que si te va a servir pq es el contenido casi lo que se lleva o bueno lleve en una buena universidad aquí en Perú solo que 1 a 2 temas que no están en ese libro pero por lo demás muy completo. Eso leerlo pero con tu lap o PC al costado para que practiques mientras lees y aprenderás de forma práctica y leyendo por tu cuenta, saludos.
1
u/CowSniper97 7h ago
If you play PC and have Steam, give "The Farmer Was Replaced" a shot, its pretty fun and gives you practical problems to solve with code.
https://store.steampowered.com/app/2060160/The_Farmer_Was_Replaced/
1
u/Impossible_Hyena_600 5h ago
try to build something you actually want to use. i made a little script that scraped a website for concert tickets i wanted and it taught me way more than any tutorial because i actually cared about making it work.
-1
u/SecAdmin-1125 16h ago
Have you heard of AI? Use it! It’s a good tool to help you learn.
-1
u/Kit2love 14h ago
Ask Ai to teach you seriously
-1
u/seanv507 16h ago
either work with online learning tools or use a coding agent(claude/copilot etc) . this will unblock you, can explain problems
-1
u/flameater 14h ago
Try flameater.wordpress.com
0
u/kayonred 9h ago
Have u tried books? They're more thorough and comprehensive than videos or websites 2 dec 26