Keyboard shortcuts

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

Chained expressions

age = 16
name = "Foo"

if 0 < age and age <= 18:
    print("age is bewteen 0 and 18")
else:
    print("age is NOT between 0 and 18")

if 0 < age <= 18:
    print("age is bewteen 0 and 18")
else:
    print("age is NOT between 0 and 18")