Booleans
A Boolean represents true or false. Comparisons produce Booleans, and conditions use truth testing to choose which block runs.
Understand the idea
Empty strings and containers, numeric zero, None, and False are false in a condition. Most other objects are true unless their type defines otherwise. The text 'False' is a non-empty string and is therefore true; parsing a user's yes/no input requires an explicit accepted vocabulary rather than calling bool on arbitrary text.
Where to try it
Open this example with Try in playground. The code loads as editable text and does not run until you select Run. The first run downloads Python. Each run starts fresh; temporary files created by a script are not files on your PC.
A worked example
print(bool([]))
print(bool("False"))
print(8 >= 3)
Read the result
The results are False, True, and True. The second is about whether text is empty, not what the letters mean.
Try one change
Write an explicit mapping for yes and no input, and decide what to do with an unrecognised answer.