Short circuit
def check_money():
return money > 1000000
def check_salary():
salary += 1
return salary >= 1000
while True:
if check_money() or check_salary():
print("I can live well")
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
def check_money():
return money > 1000000
def check_salary():
salary += 1
return salary >= 1000
while True:
if check_money() or check_salary():
print("I can live well")