First published at 21:50 UTC on May 10th, 2021.
A new segment I'm trying out called ONE PYTHON MINUTE!
I take a minute (or 2, depending) to talk very briefly about a Python topic.
This week it's Booleans (bool) and truthiness!
You probably already know about True and False as boolean…
MORE
A new segment I'm trying out called ONE PYTHON MINUTE!
I take a minute (or 2, depending) to talk very briefly about a Python topic.
This week it's Booleans (bool) and truthiness!
You probably already know about True and False as boolean values, and you might also know that None can be evaluated as a boolean "False." This is a concept known as "Truthiness."
But any type can have "Truthiness" to it. Like a list, dict, string, or number.
Take some time this week to experiment wit this concept in the Python console.
As always, please share and subscribe. You can follow @TheSrcRr at Twitter.
LESS