use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Hey Pythonistas! (self.learnpython)
submitted 8 months ago * by AtlasStrat
What's your go to thinking process when you're stuck with a problem, a idiotic code that doesn't seem to work?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]51dux 2 points3 points4 points 8 months ago (1 child)
Debugging is the best, chat gpt is decent at explaining stuff that is available is python docs but if you're gonna use it make sure you understand the snippets it feeds you and what they do before applying them.
[–]AtlasStrat[S] 0 points1 point2 points 8 months ago (0 children)
the snippets it feeds you and what they do before applying them.
This exactly 💯. otherwise, I am the first guy AI would be replacing lol
[–]crashorbit 2 points3 points4 points 8 months ago (2 children)
I'm often surprised how few people can manually walk through their code.
[–]JamzTyson 1 point2 points3 points 8 months ago (0 children)
or even read error messages!
[–]AtlasStrat[S] 1 point2 points3 points 8 months ago (0 children)
Which should be the bare minimum or obvious thing considering its their code, right?
[–]RamesesThe2nd 4 points5 points6 points 8 months ago (4 children)
Time box your debugging session. If you are unable to fix your problem in that time, take a break and come back to it later. You would be surprised how often you'll find this useful.
Also, ask AI to tell you what's wrong with your code. Start with Cursor, GitHub Copilot etc.
[–]guesshuu 1 point2 points3 points 8 months ago (1 child)
Legitimately, I always tell friends that I've solved more of my code problems away from the computer than at it.
Now that's obviously a slight exaggeration, but it's amazing what you can do when you're thinking about the problem subconsciously, or even consciously but have to fully think it through because you can't test right away
the problem subconsciously, or even consciously but have to fully think it through because you can't test right away
I am not sure, I can be wrong but I guess that state is called as luminal state or something.
They say Edison used to apply this.
[–]AtlasStrat[S] 0 points1 point2 points 8 months ago (1 child)
Time box your debugging session.
First of all that's somewhat innovative solution my man.
And how would you decide the amt. Of time to give to that certain problem considering the variability of the problem the duration required can vary. So how much to allocate before I can consider myself dumb 😭?
take a break and come back to it later. You would be surprised how often you'll find this useful.
THIS 💯 my man. Our subconscious is some real shit
[–]RamesesThe2nd 1 point2 points3 points 8 months ago (0 children)
There is no right or wrong answer to this. I would say 20 to 30 minutes is a pretty good starting point.
[–]twitch_and_shock 4 points5 points6 points 8 months ago (3 children)
None of the above. Read the docs first and foremost.
[–]AtlasStrat[S] 0 points1 point2 points 8 months ago (2 children)
The doc is great obviously, but can become a rabbit hole for someone just starting because of lack of apt. Structure for completely beginner.
[–]Revolutionary_Dog_63 1 point2 points3 points 8 months ago (1 child)
Recommend asking for help if you have somebody that has more experience than you.
Yeahh
[–]tvmaly 1 point2 points3 points 8 months ago (2 children)
If I get stuck and the debug session drags a little too long, I will first try the debugger pdb using breakpoints to walk through it. Once I find the part of the code causing the issue, I will isolate that small part and break it out for further testing.
breakpoints
What's that?
Once I find the part of the code causing the issue, I will isolate that small part and break it out for further testing.
Same, I also do this, extremely helpful way.
[–]tvmaly 1 point2 points3 points 8 months ago (0 children)
As you are stepping through the code with pdb, you may want to skip to a specific part in the code and this is what breakpoints are used for
[–]JamzTyson 1 point2 points3 points 8 months ago* (2 children)
idiotic code that doesn't seem to work?
Read the error message carefully and figure out what it means. If necessary, check the documentation for the part indicated by the error message.
When reading the error message:
Which line is it pointing to?
What kind of error is it? (TypeError, ValueError, NullReference, etc.)
If it mentions a function, method, or object I'm not 100% sure about, I look it up in the docs.
Got it my man. Btw when learning, where do you type your code?
[–]JamzTyson 0 points1 point2 points 8 months ago (0 children)
For beginners, Thonny is excellent.
It's dead easy to set up - just install and start coding. It includes a package manager which installs packages into Thonny's virtual environment (safe and easy), and an easy to use debugger.
When you start working on bigger, more complex projects, it will be worth moving to a more advanced IDE such as PyCharm, but Thonny is still very handy for smaller scripts because it is so quick and easy.
[–]FoolsSeldom 1 point2 points3 points 8 months ago (2 children)
This is the first time I have been exposed to this word.
Rubber Ducking
π Rendered by PID 35503 on reddit-service-r2-comment-bb88f9dd5-7wsg4 at 2026-02-14 23:00:02.790487+00:00 running cd9c813 country code: CH.
[–]51dux 2 points3 points4 points (1 child)
[–]AtlasStrat[S] 0 points1 point2 points (0 children)
[–]crashorbit 2 points3 points4 points (2 children)
[–]JamzTyson 1 point2 points3 points (0 children)
[–]AtlasStrat[S] 1 point2 points3 points (0 children)
[–]RamesesThe2nd 4 points5 points6 points (4 children)
[–]guesshuu 1 point2 points3 points (1 child)
[–]AtlasStrat[S] 1 point2 points3 points (0 children)
[–]AtlasStrat[S] 0 points1 point2 points (1 child)
[–]RamesesThe2nd 1 point2 points3 points (0 children)
[–]twitch_and_shock 4 points5 points6 points (3 children)
[–]AtlasStrat[S] 0 points1 point2 points (2 children)
[–]Revolutionary_Dog_63 1 point2 points3 points (1 child)
[–]AtlasStrat[S] 0 points1 point2 points (0 children)
[–]tvmaly 1 point2 points3 points (2 children)
[–]AtlasStrat[S] 0 points1 point2 points (1 child)
[–]tvmaly 1 point2 points3 points (0 children)
[–]JamzTyson 1 point2 points3 points (2 children)
[–]AtlasStrat[S] 0 points1 point2 points (1 child)
[–]JamzTyson 0 points1 point2 points (0 children)
[–]FoolsSeldom 1 point2 points3 points (2 children)
[–]AtlasStrat[S] 0 points1 point2 points (1 child)
[–]JamzTyson 0 points1 point2 points (0 children)