Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

função map python

lista =  [1, 2, -3, 4, 5, -9]
def quadrado(n):
    return n*n
 
map(quadrado, lista)
[1, 4, 9, 16, 25, 81]
Source by wiki.portugal-a-programar.pt #
 
PREVIOUS NEXT
Tagged: #map #python
ADD COMMENT
Topic
Name
9+3 =