Randomize specific list parts

OS (e.g. Win10):
PsychoPy version (e.g. 2020.1.3):
**Standard Standalone? (y)


What are you trying to achieve?:
I am trying to program a false friends experiment. In such experiment 10 lists with 12 items to be learnt are presented to participants. Each list is followed by a recognition list (old/new). The items in the recognition list have to be presented in a specific order:

  1. always at first the first item of the learn list
  2. then randomly: two items never presented, the second item of the learn list, two items associated with the list topic but never presented
  3. the topic of the list always as last item of the recognition list.

I have all recognition items (and learn items) in separate excel files. How do I realize that the first and the last item in the recognition phase are fixed and the other items can appear in random order?

What did you try to make it work?:

I thought about creating a routine for the first and the last item but this seems rather ineffecient (and not elegant at all).

Suggestions are heartly welcome.

Cheers Jens

Hi Jens,

Have a look at https://pavlovia.org/Wake/brookes-template-2020 and https://pavlovia.org/Wake/prospective-memory-ldt

I would load the two lists into arrays so they can be interleaved in a third loop.

If you just wanted to randomise a portion of an Excel file then that could be done more simply via the Selected Rows field which could have row 0 then rows in a random order then row 11 if you wanted to randomise the middle 10 of a set of 12 trials.


well I guess that using the Selected Rows field is the easiest solution. Create three routines, one for the first item of the learn list, another for the randomly selected items and a third one for the theme of the list.

I wondered if there if there is mor elegant solution but my Python is still too bad to implement such solution in on routine.

Cheers Jens