I want to filter elements from a list of lists, and iterate over the elements of each element using a lambda. For example, given the list:
a = [[1,2,3],[4,5
Ok, obviously you know that you can use sum. The goal of what you are trying to do seems a bit vague, but I think that the optional parameter syntax might help you out, or at least give you some inspiration. If you place a * before a parameter, it creates a tuple of all of itself and all of the remaining parameters. If you place a ** before it, you get a dictionary.
To see this:
def print_test(a,b,c,*d):
print a
print b
print c
print d
print_test(1,2,3,4,5,6)
prints
1
2
3
(4, 5, 6)
You can use this syntax with lambda too.
Like I said, I'm not sure exactly what you are trying to do, but it sounds like this might help. I don't think you can get local variable assignments in lambda without some hacking, but maybe you can use this to assign the values to variables somehow.
Edit: Ah, I understand what you are looking for moreso now. I think you want:
lambda (a, b, c): a+b+c > N