72. & 73. & 74. Introduction / Aggregator / Coding
Associated Truth Values
— every object in Python has an associated truth value
— Except:
- None
- False
- Zero in any numeric type: (0, 0.0, 0+0j…)
- Empty sequences: list, tuple, string…
- Empty mapping type: dicts, set…
- Custom classes that implement a bool , len ; When python read the class if no bool then go to len and return truth value or false value as 0.
— Any methods return false or 0

Predicate: A function that takes a single argument and return true or false is called a “Predicate”
Ex: Boolean


Coding