On 01/10/14 03:16, Steven D'Aprano wrote:
For example map() which applies a function to a collection.
total = map(operator.add, [1,2,3,4,5,6])
is the same result as
total = sum([1,2,3,4,5,6])
No, you're thinking of reduce(), not map().
Oops, you're quite right.
Apologies.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor