I cannot randomly select stimulus from more than one list simultaneously

I am currently trying to design a simple word recognition task in PsychoPy. There is no problem in the study phase since it is easy in PsychoPy to select words randomly from one specified column in an Excel file (16 random study words from 24 study words written in one column). However, it gets much more complicated in the test phase. I need to randomize half of the study words that are previously shown to participants in the study phase with test words of the same number (random half of the 16 study words shown in the study phase + 8 test words that are written on the second column). How can I achieve this? Is there anyone who can help with this issue?