Ask Your Question

Revision history [back]

You can use any of all as follows:

sage: L = [1,2,3,4,5]
sage: all(x < 10 for x in L)
True

sage: all(x < 3 for x in L)
False

sage: any(x < 3 for x in L)
Thue

You can use any of all as follows:

sage: L = [1,2,3,4,5]
sage: all(x < 10 for x in L)
True

sage: all(x < 3 for x in L)
False

sage: any(x < 3 for x in L)
Thue
True