a_list = [1, 2, 3] multiplied_list = [element * 2 for element in a_list] # [2, 4, 6]
a = [1, 2, 3] def multiray(a): return [i * 2 for i in a] multiray(a) # [2,4,6]