Say I have some probabilities that happen to add up to 1
prob=[.80,.10,.05,.02,.02,.01]
that correspond to the elements
elements=["A","B","C","D","E","F"]
And I want to randomise the list so that each element has their probability of being picked and put into the firstmost available slot, but once picked is not picked again.
I searched StackOverflow but I could only find either selecting elements totally at random or only selecting a single item with a weighted random.