Hi all, I’ve been trying to make a graph that will replace values in a list at random. For instance if I have a list of 5 "A"s, I want the graph to replace 2 of them to “B” at a random index.

example:

- A to 0. A
- A to 1. B
- A to 2. A
- A to 3. A
- A to 4. B

I’ve tried the “math.random” node with “math.remap” (between 0 and 4 for the above example) then “round” to specify random index to replace but sometimes this produces duplicate numbers (since for example 1.674 and 1.832 both round to 2). Thus only replacing one letter, not two.

If this can be solved, I’d then want to replace another two in the next phase of the graph, but only from the "A"s:

- A to 0. A to 0. B
- A to 1. B to 1. B
- A to 2. A to 2. B
- A to 3. A to 3. A
- A to 4. B to 4. B

Sorry , as I’m not in office I can’t post WIP graphs but hopefully the above information is adequate to get some helpful pointers on how I can solve this