- I make a random selection from a list
- Now based on the value of 1, I want to make another random selection from the same list where the value == 1
- I want to now make another random selection where value != 1
e.g
my_list = [a, a, b, c, d, e, a, b]
- First random selection index = 1, i.e my_list[idx_1] = a
- Second random selection index could be one of (0,6)
- Third random selection index could be one of (2,3,4,5,7)
Return value should be index of selection.
Note that filtering the list etc will not work as I need the index in the original list, not the filtered list.
Aucun commentaire:
Enregistrer un commentaire