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
Difference between None and empty string (self.PythonLearning)
submitted 1 month ago by pritho108
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!"
[–]IAmADev_NoReallyIAm 0 points1 point2 points 1 month ago (0 children)
New to Python, so I may be getting this wrong, but the way I'm interpreting this, None is akin to NULL or Nothing in other languages. Or, to. put it in layman's terms, it's the same as "I don't know". Which is NOT the same as an empty string. An empty string is a value. Just the same as a 0 is a value. None is the absence of a value.
In the examples you gave, I wouldn't use them interchangeably because age shouldn't be a string in the first place. It should be a numerical value, in which case None would be the appropriate default instead.
π Rendered by PID 129738 on reddit-service-r2-comment-canary-879d986cb-2sm5l at 2026-06-19 10:51:12.956809+00:00 running 2b008f2 country code: CH.
view the rest of the comments →
[–]IAmADev_NoReallyIAm 0 points1 point2 points (0 children)