Answers for "how to divide all numbers in list"

1

divide a value by all values in a list

import numpy as np
myList = [10, 20, 30, 40, 50, 60, 70, 80, 90]
myInt = 10
newList  = np.divide(myList, myInt)
Posted by: Guest on October-27-2021
1

divide all elements of list by an integer

myList[:] = [x / myInt for x in myList]
Posted by: Guest on August-09-2020

Code answers related to "how to divide all numbers in list"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language