Back to Lesson
Batch Validation
Use any() and all() to evaluate system state rules.
Instructions
- Given a list of user statuses:
flags = [True, True, False, True, True] - Useto check if everyone is active. Print the result.
all() - Verify if offline users exist. Useon a list mapping the False elements (e.g.,
any()). Print this result.[not f for f in flags]
main.py
main.py
Ctrl + Enter