I have a bunch of lists numbers that contains different numbers, and the number of items within each lists differs.
listA = [10, 5, 32, 8, 3]
listB = [25, 22]
listC = [6, 35, 1]
If I am going to set a limitation where each lists can only hold up to a sum of minimum value 50, what is the best way that I can approach this?
if you're program runs such as the user inputs number then inserting it to a List, you do this pseudo:
if sum(list) + num >= 50
append num to list
On the creation of list and you want it to have a value of > 50, just add random stuff tiLL it reach 50
if sum(list) < 50