I have a set of variables each containing an array of chosen integers:
var_1 = [0.5, 1, 2]
var_2 = [0.5, 1, 4, 7.5]
var_3 = [1, 1.5, 3.5, 4, 5.5, 10]
I would like to choose each number from each of the stated variables above and add them together until the first combination of those variables falls within a specified win range such as:
winning_range = [15-20]
So the above winning_range would be the first combination that falls between integers 15-20
I would like to print the winning combination as a dictionary with each combination piece along with a dictionary key showing the value of the numbers added up:
{var_1 = 2, var_2= 7.5, var_3= 10, total= 19.5}
What would be the most efficient way to obtain this through python?