Truthiness in Python

Published: 14 August 2023
on channel: Python Morsels
586
23

In Python, truthiness is asking the question, what happens if I convert an object to a boolean. Every Python object is truthy by default. Truthiness in Python is about non-emptiness and non-zeroness.

Read an article version of this video at https://pym.dev/truthiness/

Find more Python screencasts at https://pym.dev/screencasts/

00:00 If statements check truthiness
00:55 Boolean expressions check truthiness
01:10 The documentation calls this "truth value testing"
01:44 Empty objects are falsey
02:31 Truthiness is about non-emptiness
03:01 Truthiness is also about non-zeroness
03:39 Summary


On this page of the site you can watch the video online Truthiness in Python with a duration of hours minute second in good quality, which was uploaded by the user Python Morsels 14 August 2023, share the link with friends and acquaintances, this video has already been watched 586 times on youtube and it was liked by 23 viewers. Enjoy your viewing!