The heading may sound bizarre but here is what I mean:
def f(x, y, z):
return a_single_number_from_xyz
l = [(10, 'abc', 'def'), (20, 'efg', 'hij')]
print sum([ret_value_of_f_from_first_tuple, ret_value_of_f_from_second_tuple])
The three arguments of function f is the three elements of each of the tuple. Now, I want to apply function f to every tuple of list l and want to get the sum of those single numbers. How do I do that in a single statement? How do I map function and use list comprehension together here?