I have one question about python: Let's say I have a vector which has the form
a = [ [[0.58, 0.0001], [0.43, 0.002]],
[[0.55, 0.1], [0.45, 0.2]],
[[0.7, 0.0021], [0.3, 0.2]] ]
The 0.58 and 0.43 is a probability as well as 0.55 and 0.45, and 0.7 and 0.3. I would like to get p1=0.58 * 0.55 * 0.7, p2=0.58 * 0.45 * 0.7, etc., so all possibilities in a tree diagram. The best output would also consider the corresponding value, so something like
[p1, (0.0001, 0.1, 0.0021)], [p2, (0.0001, 0.2, 0.0021)], ...
Thank you very much!