n = float('nan')
n == n # False — violates reflexivity
n in [n] # True! — containment checks `is` before `==`
{n, n} # one element, same reason
sorted([3, n, 1]) # garbage output — comparisons are all False
# bool is subinstance of int in python
isinstance(True, int) # True
True + True # 2
sum([True, False, True]) # 2 — actually idiomatic for counting