PennController for IBEX › Forums › Support › Pairing two lists together › Reply To: Pairing two lists together
November 18, 2021 at 10:33 pm
#7514
![](https://www.pcibex.net/wp-content/uploads/2018/10/IMG_8365-e1540835663655-150x150.jpg)
Keymaster
Hello,
This is actually a question that regularly comes back. If you have the same number of words and sentence frames, and you can pair them in any possible ways, you could do something like this. List the sentence frames and the words in the same table:
Sentence,Word
Hello _!,world
Bye _...,Earth
Then you can do something like this:
words = []
Template( row => newTrial("dummy", words.push(row.Word)) )
Template( row =>
newTrial( "mytrial",
fisherYates(words),
word = words.pop()
,
newButton( row.Sentence.replace('_',word) ).print().wait()
)
)
Jeremy