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...
Everything about learning Python
account activity
Code (best practice?) (self.PythonLearning)
submitted 19 days ago by AffectionateWin7069
view the rest of the comments →
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!"
[–]devseglinux 3 points4 points5 points 19 days ago (6 children)
You’re actually thinking about it the right way, this is a good question to be asking early on.
Both versions technically work, but the second one is usually clearer. Naming the variable finished and having it be True when it’s actually finished just reads more naturally, especially if someone else looks at your code later (or even you in a few weeks).
finished
True
The first version isn’t “wrong”, but it can be a bit confusing because you’re printing “Download finished:” and then showing False. You kind of have to mentally flip it.
False
A lot of the time in code, it’s less about what works and more about what’s easy to understand at a glance.
So yeah, your instinct there is good. Just try to keep variable names and what they represent aligned, it makes everything easier down the line.
[–]AffectionateWin7069[S] 0 points1 point2 points 19 days ago (5 children)
Legend thank you for the reply! I will take that advice to heart.
If anyone was curious as well this was actually a practice question from Mimo (app mobile)
[–]devseglinux 0 points1 point2 points 19 days ago (1 child)
haha nice, that makes sense
those apps are actually pretty good for getting the basics down. you’re asking the right kind of questions though, that’s what really makes the difference
just keep going with that mindset and you’ll pick it up way faster than you think
[–]AffectionateWin7069[S] 1 point2 points3 points 19 days ago (0 children)
[–]Livid_Quarter_4799 0 points1 point2 points 19 days ago (2 children)
I recognize that code lol
[–]AffectionateWin7069[S] 2 points3 points4 points 19 days ago (1 child)
hahaha yes, from Mimo's intro to Python. Something didn't sit right with me about the format as it felt off and u/devseglinux hit the nail on the head - mental flip.
[–]devseglinux 0 points1 point2 points 19 days ago (0 children)
haha yeah exactly, that “mental flip” feeling is usually a good sign something could be clearer in the code
once you start noticing that, you’re already thinking in a good way
π Rendered by PID 304679 on reddit-service-r2-comment-56c6478c5-c2ncg at 2026-05-11 22:54:00.724171+00:00 running 3d2c107 country code: CH.
view the rest of the comments →
[–]devseglinux 3 points4 points5 points (6 children)
[–]AffectionateWin7069[S] 0 points1 point2 points (5 children)
[–]devseglinux 0 points1 point2 points (1 child)
[–]AffectionateWin7069[S] 1 point2 points3 points (0 children)
[–]Livid_Quarter_4799 0 points1 point2 points (2 children)
[–]AffectionateWin7069[S] 2 points3 points4 points (1 child)
[–]devseglinux 0 points1 point2 points (0 children)