[Tutor] Higher-Order Function Examples
Walter Prins
wprins at gmail.com
Mon Feb 14 21:06:34 CET 2011
2011/2/14 Rafael Durán Castañeda <rafadurancastaneda at gmail.com>
> Could we consider sorted as an high order function?
>
> sorted_list = sorted(list_strings, key = str.lower)
>
>
No because sorted() returns a list as a result. A higher order function
produces another function as a result, or takes one or more functions as a
parameter.
Walter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110214/441500fb/attachment.html>
More information about the Tutor
mailing list