나는 다음과 같은 목록이 있습니다목록에 연속 숫자를 곱 하시겠습니까?
list1 = [1, 5, 7, 13, 29, 35, 65, 91, 145, 203, 377, 455, 1015, 1885, 2639, 13195]
가 어떻게 목록에있는 모든 수를 곱 않습니다를? 예 : 1 * 5 * 7 * 13 * 29..etc
.
from functools import reduce
import operator
reduce(operator.mul, [1, 2, 3])
>>> 6
기본적으로 말하고있는 줄 :?
for numbs in list1:
numbs * list1[#iterate through list1, starting on 2nd item in list1]