2015-03-02 10:21:10 -07:00
|
|
|
# test builtin "all" and "any"
|
|
|
|
|
|
|
|
tests = (
|
|
|
|
(),
|
|
|
|
[],
|
|
|
|
[False],
|
|
|
|
[True],
|
|
|
|
[False, True],
|
|
|
|
[True, False],
|
|
|
|
[False, False],
|
|
|
|
[True, True],
|
2015-03-02 10:55:55 -07:00
|
|
|
range(10),
|
2015-03-02 10:21:10 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
for test in tests:
|
|
|
|
print(all(test))
|
|
|
|
|
|
|
|
for test in tests:
|
|
|
|
print(any(test))
|