hyb
2025-11-10 e0a856b5072c5a09f3f6de6da85abf90e00ee704
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Copyright (c) 2010-2024 openpyxl
 
"""
math.prod equivalent for < Python 3.8
"""
 
import functools
import operator
 
def product(sequence):
    return functools.reduce(operator.mul, sequence)
 
 
try:
    from math import prod
except ImportError:
    prod = product