|   | 1 |  initial version  | 
You can try
map(lambda x: x%2,[4,3,2,1,1])
then
sum(map(lambda x: x%2,[4,3,2,1,1]))
will return the desired output.
What happens when you use mod(x,2) is that sage returns an element of $\mathbb{Z}_2$, however the % operator returns an Integer.
 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.
 
                
                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.