# 第6章示例:逻辑运算 and / or / not

age = 20
is_student = True

print(age > 18 and is_student)    # True
print(is_student or age > 25)     # True
print(not is_student)             # False

# 短路求值演示:右边根本不执行
def say():
    print("我被调用了!")
    return True

print(False and say())   # 直接 False,say() 不会被调用
print(True or say())     # 直接 True,say() 不会被调用
