Testing twice without stimuli repetition

Hi I’m completely new to codind so I’m a bit lost here. I have to make a face stimuli recognition experiment with two trials. The faces have the categories race (white, asian) and sex (m,f), I already figured out how to randomly choose the same amount of pictures from each category for the learning phase (excel sheet etc written), in the next step there should be the recognition part where those old faces and the exact same amount of new faces will be shown, again randomly choosen. Then there will be a short distraction task and the same test will repeat but this time it should randomly show image stimuli that weren’t already shown in the first round. Is there some kind of code I could paste in to let it choose only new stimuli? I can’t make two seperate lists in the beginning because it needs to be randomized.
I hope it’s somehow clear what I need. Any help would be very appreciated.

Have a look at my Independent Randomisation or PM demos for how to load stimuli into a list (or Trial Switching for how to do it in code).

If you use these methods to append to a list called wordList then you could select each word using thisWord = wordList.pop() which assigns the last word in the list and removes it so it can’t be used again.