Lisp mentality vs. Python mentality

Paul Rubin http
Sat Apr 25 16:10:07 EDT 2009


Hrvoje Niksic <hniksic at xemacs.org> writes:
> I guess you meant map(a, str.upper) == map(b, str.upper)?  a and b are
> lists of strings.

Oh, sorry.  Yes, either 

    map(str.upper, a) == map(str.upper, b)

or

    all(str.upper(x)==str.upper(y) for x,y in zip(a,b))



More information about the Python-list mailing list