Python Fundamentals / Making decisions
Lesson 14 of 38
and, or, not
Combine conditions with and (both must be True), or (at least one True) and not (flips True and False).
Key points
- and: both
- or: either
- not: opposite
age, has_ticket = 16, True
if age >= 12 and has_ticket:
print("Come in")Quiz · +10 XP
What does True and False give?
Log in to save progress and earn XP.