← How-To Guides How-To How to map over a list Use list comprehension [f(x) for x in lst] or map(f, lst). list(map(...)) if you need a list. Comprehension [x*2 for x in lst] doubles each element. nums = [1,2,3] doubled = [x * 2 for x in nums]