Mar-27-2017, 12:04 PM
You forgot to return the value computed in your function:
>>> def az(x): ... return x*2 ... >>> q = map(az, [2, 3, 4]) >>> list(q) [4, 6, 8]