I\'m completely new to the subject and I want to ask how to sum up all even integers in a list (without using functions (I haven\'t studied them yet))? For example:
You can filter out all non-even elements like so
my_list = [1, 3, 5, 6, 8, 10, 34, 2, 0, 3] even_list = filter(lambda x: x%2 == 0, my_list)
and then sum the output like so:
sum(even_list)