Feb. 20, 2002
1:59 p.m.
Which (if either) of the two codes would be preferred:
I agree with Danny that a list-based approach would be better: from operator import add def check(testlist): return reduce(add,[i%2==0 for i in testlist])
check([1,4,5,9,3,8,7]) 2
Kirby
8382
Age (days ago)
8382
Last active (days ago)
0 comments
1 participants
participants (1)
-
Kirby Urner