[pyar] Explicacion - map()

Germana Oliveira germanaoliveirab en gmail.com
Lun Jul 23 18:45:38 ART 2012


Saludos!

quisiera, por favor, me explicaran esto:

More than one sequence may be passed; the function must then have as
many arguments as there are sequences and is called with the
corresponding item from each sequence (or None if some sequence is
shorter than another). For example:

>>> seq = range(8)
>>> def add(x, y): return x+y
...
>>> map(add, seq, seq)
[0, 2, 4, 6, 8, 10, 12, 14]


No entiendo porque el doble "seq" en el map.

Gracias.


-- 
Germana Oliveira B.
blog: http://g0liv3ir4.wordpress.com
identi.ca: @goliveira




More information about the pyar mailing list