Assign comparisons to variables



examples/boolean/true_false.py
x = 2

v = x == 2
print(v)
if v:
    print(v, "is true - who would thought? ")

v = x == 3
print(v)
if v:
    print(v, "is true - who would thought? ")
else:
    print(v, "is false - who would thought? ")

# True
# True is true - who would thought?
# False
# False is false - who would thought?