Slice the true results
Exercise and reference answers
- Does not match the category
- a = b
- x += 1
- input
- Matches the category
- a == b
- x > 0
- not p
- p or q
- p and q
- Instructions
- Slice only the expressions that give a Boolean. Spare the rest.
Explanation
_Source: OpenStax Introduction to Python Programming, Chapter 4._