counters = [1, 2, 3, 4]updated = []for x in counters: updated.append(x + 10) # add 10 to each itemprint updateddef inc(x): return x + 10 # function to be runprint map(inc, counters) # collect resultsprint map((lambda x: x + 3), counters) # function expression
Name (required)
email (will not be published) (required)
Website