Is it possible to have distractors drawn from a list and then not used again?

Hi all!

I am wondering if the following is possible in PsychoPy.

  • Imagine that I have 100 words, and within them are 5 lists of 20.
  • On a given trial I would like to present a random target word, along with a random competitor from the same list.
  • I want to be sure that once a word appears as a target or a competitor, it cannot appear again for the rest of the experiment.

Is this sort of thing easy to do in PsychoPy?

Over the past year I’ve started using .pop() for this.

If you set up a list of items and shuffle it then every time you want one you can use

thisItem = allItems.pop()

This will remove the final item from the list and assign it to the thisItem variable.

Thanks! And is this still viable if there are five sublists?

One of my active experiments has three lists of four sentences which get reset every 12 trials.