I started programming in python after a time I was programming in c#, and in c# I used quite often did things like the following:
list.sum(x => x * 2);
where list contains some kind of a number.
is there any thing like this in python? for example i want to do this:
>> arr = range(1,10)
>> linq_like_sum(lambda x : x**2 , arr)
and get the sum of squares of arr.
Just use a generator expression: