Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

divide all values in array python

list = [1, 2, 3, 4, 5]
list = [x / 2 for x in list] 
#Result: list = [0.5, 1, 1.5, 2, 2.5]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #divide #values #array #python
ADD COMMENT
Topic
Name
8+9 =