Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

multiply each element in list python

a_list = [1, 2, 3]

multiplied_list = [element * 2 for element in a_list]

# [2, 4, 6]
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #multiply #element #list #python
ADD COMMENT
Topic
Name
6+2 =