I have a study related "problem". I'm trying to write as functional/side-effect free code as possible in Python. The problem ist as follows:
I need to choose x items from a list based on different probabilities for each item. The newly chosen items may not be chosen yet, so no "putting back".
How could I achieve this without traditional loops or reassignments/changes to variables?