Ah whoops fixed that now. Thank you for letting me know. I tend to mistype and misread numbers a lot, so I'm not super surprised I messed that up :)
I could have done it using random samples, but I had assumed there might be multiple solutions, so I wanted to iterate over all possible ones instead. That solution does work too.
Also, I looked back at itertools's documentation and realized I missed that there is a itertools.combinations
function I missed that would work as well and make the code I had simpler.