Change map(f, l) to [f(x) for x in l]