circuitpython/tests/basics/builtin_allany.py
2015-03-02 17:21:10 +00:00

21 lines
306 B
Python

# test builtin "all" and "any"
tests = (
(),
[],
[False],
[True],
[False, True],
[True, False],
[False, False],
[True, True],
(False for i in range(10)),
(True for i in range(10)),
)
for test in tests:
print(all(test))
for test in tests:
print(any(test))