To get all the combos, I need to add up one element of a list with one element of each other list.
It sounds like you want itertools.product. To simplify the example, let's just take three of your seven terms (but it's trivial to pass more, or fewer, arguments into product):
import itertools
b = [45] # I assume this represents the "bar" and that it's not optional
ts = [0, 5, 10, 15]
fs = [0, 10]
combos = itertools.product(b, ts, fs)
for combo in combos: print(list(combo))
prints the following:
[45, 0, 0]
[45, 0, 10]
[45, 5, 0]
[45, 5, 10]
[45, 10, 0]
[45, 10, 10]
[45, 15, 0]
[45, 15, 10]
...which sounds like what you want when you refer to "all the combos".
To get the sum of each, it can all be done in one line:
totals = [sum(combo) for combo in itertools.product(b, ts, fs)]
Here's a possible flexible way of parameterizing the function:
import itertools
def PossibleWeights(*weights):
return list(itertools.product(*[[weightset] if isinstance(weightset, (int, float)) else [sum(weightset[:i]) for i in range(len(weightset)+1)] for weightset in weights]))
When you call, say, PossibleWeights( 45, [10]*2, [5]*3 ) the call itself makes it explicit (and readable) that there is one compulsory 45-pound weight, two possible 10-pound weights, and three possible 5-pound weights. You have complete flexibility as to how many such arguments you pass and what their values are.
You could then use a dict to associate each total weight with the combo used to achieve it (incidentally removing duplicate totals, where more than one combo adds up to the same total):
d = {}
for combo in PossibleWeights( 45, [10]*2, [5]*3 ):
d[sum(combo)] = combo
...and then pretty-print the result:
for total, combo in sorted(d.items()):
print('sum(%r) = %r' % (combo, total))
Output:
sum((45, 0, 0)) = 45
sum((45, 0, 5)) = 50
sum((45, 10, 0)) = 55
sum((45, 10, 5)) = 60
sum((45, 20, 0)) = 65
sum((45, 20, 5)) = 70
sum((45, 20, 10)) = 75
sum((45, 20, 15)) = 80
BTW: if you want to achieve each total using the minimum number of plates, make sure you're passing heavier plates before lighter plates in your call to PossibleWeights, as in the example above.
Balancing both sides of the bar is left as an exercise for the reader ;-)