Question: I am trying to create a loop that will give me list of sets of elements or sets of sums (sorry I dont know exactly how to phrase this). I have attached an example and would be grateful if someone could help.

If I have a set S:= [a,b,c],

I want the loop to give me: [[a,b,c],[a+b,c],[a+c,b],[a,b+c],[a+b+c]]

Please Wait...