| 1 | initial version |
No loop is necessary:
all(el <= c for el in L)
| 2 | No.2 Revision |
No explicit loop is necessary:necessary. If L is the list and c is the particular number, then you can do:
all(el <= c for el in L)
| 3 | No.3 Revision |
No explicit loop is necessary. necessary; you can use a generator expression in combination with all. If L is the list and c is the particular number, then you can do:
all(el <= c for el in L)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.