4 ms·There's probably a lot more than two ways too, eg. mylist = map(lambda x: x * 2, range(1, 10))by lgas 6y agoThere's probably a lot more than two ways too, eg. mylist = map(lambda x: x * 2, range(1, 10))fractalb 6y agomap will return an iterator, not a listkortilla 6y agoThen call list(map(... The point stands.kragen 6y agoOnly in Python 3, not Python 1 or Python 2.