# Using a list comprehension: l = [x * 2 for x in l] # Using a lambda function with map: l = map(lambda x: x * 2, l)