0

How to built a program for getting product of entries in a list

24th Jan 2017, 8:19 AM
HARIHARAN DS
HARIHARAN DS - avatar
3 Respuestas
0
For example we have a list: x = [1,2,3,4] res = 1 # init a first value for i in x: # for every number in list res *= i # product it with previous print (str(res)) # will print 24
24th Jan 2017, 1:27 PM
Leshark
Leshark - avatar
0
liste=[1,2,3,4,5] result=1 for i in liste: result*=i print (result)
25th Jan 2017, 6:42 PM
ramzi
ramzi - avatar
- 1
By database??? Or other
24th Jan 2017, 8:38 AM
Shubham Surya
Shubham Surya - avatar