Given a list of list of frequencies (see example). How can I get the product of all the nth members of the list. For example:
l1 = [1,2,3]
l2=[4,5,6]
output = [4,10,18]
How can I accomplish this if the length of the list is unknown. Please answer with a pythonic way, I appreciate the help!
Sample Data:
[
[0.8507462686567164, 0.14925373134328357], [0.9870967741935484,
0.012903225806451613], [0.5833333333333334, 0.4166666666666667],
[0.4791666666666667, 0.5208333333333334], [0.9379084967320261,
0.06209150326797386], [0.9657320872274143, 0.03426791277258567],
[0.9914529914529915, 0.008547008547008548], [0.9050279329608939,
0.09497206703910614], [0.7660944206008584, 0.23390557939914164]
]
output:
[product of 1st elements, product of 2nd elements, product of n elements]