What is the Pythonic way of summing the product of all combinations in a given list, such as:
[1, 2, 3, 4]
--> (1 * 2) + (1 * 3) + (1 * 4) + (2 * 3) + (2 * 4) + (3 * 4) = 35
(For this example I have taken all the two-element combinations, but it could have been different.)