psychopy.org | Reference | Downloads | Github

How to add multiple lists?

I’m very new to python and psychopy, any help would be appreciated.

What are you trying to achieve?:
I want my SmallList’s column “Words” to be populated randomly with words from a MasterList. So if there are 50 total words in the Masterlist and the SmallList holds 5 words with certain colour parameters for each, I want a random selection of 5 words to fill the spaces, and on the next trial use a different 5 words.

What did you try to make it work?:
I made two loops, the outside one with the Masterlist and one inside with the SmallList, but what happened was that the spaces in the SmallList were all filled with the same word. Eg. Ice(blue), Ice(red), Ice(green), Ice(yellow), Ice(purple), and then it moved to the next word in the Masterlist. I want it to look like Ice(blue), Truck(red), Door(green), Toe(yellow), Shirt(purple), and then on a future trial choose a new selection of random words but keep the colour order the same.

Any input would be appreciated. Thank you.

Hello, we really need a more precise description of what you want to do. But note that only one row of each conditions file is available to you on each trial. So if you simply want to access five words per trial from an outer loop conditions file, then you need five columns (i.e. one per word) in that file, rather than one.