from numpy import prod
from itertools import combinations
lst = [2, 3, 5, 7]
[prod(x) for i in range(2, len(lst) + 1) for x in combinations(lst, i)]
Compute all products for all numbers in a python list