a_list.count(a_callable) ?
Dustan
DustanGroups at gmail.com
Thu Jun 14 16:51:35 EDT 2007
On Jun 14, 3:37 pm, Dustan <DustanGro... at gmail.com> wrote:
> map and filter are basically obsolete after the introduction of list
> comprehensions
It is probably worth noting that list comprehensions do not require
that you write a new function; they take any expression where
appropriate. For more information on list comprehensions, see:
http://docs.python.org/tut/node7.html#SECTION007140000000000000000
Generator expressions are the same, except syntactically they have
round brackets instead of square, and they return a generator instead
of a list, which allows for lazy evaluation.
More information about the Python-list
mailing list