May-29-2022, 07:21 AM
taking two lists of equal length:
>>> list1 = [0.74, 0.91, 1.22, 0.91, 1.07, 1.07, 1.07, 1.07, 1.07, 0.74, 0.91, 0.91, 1.07, 1.07, 0.91, 1.07] >>> list2 = [1.23, 0.97, 2.09, 0.97, 0.83, 0.83, 0.83, 1.23, 0.83, 0.83, 0.83, 0.83, 0.83, 0.83, 0.83, 0.83] >>> result = [l1 * l2 for l1, l2 in zip(list1, list2)] >>> print(result) [0.9102, 0.8827, 2.5498, 0.8827, 0.8881, 0.8881, 0.8881, 1.3161, 0.8881, 0.6142, 0.7553, 0.7553, 0.8881, 0.8881, 0.7553, 0.8881]