Truthiness Function in Python
def is_truthy(s): return s in ['True', 'true', 'Yes', 'yes', True]
A Python function checks whether a value represents truth using several textual spellings and the boolean True. The joke is the overly specific, redundant definition of “truthy,” making a simple concept look unnecessarily complicated.
- @dev_meme / 5002 2022-11-18
- Type
- image
- Size
- 487×54 · 5.7 KiB
- Mood
- саркастичный
- Language
- en
- Added