Creating a For Loop

Thanks for the new keywords, Michael.

I have been searching through the forums and found one that seems like it can be molded to work:

Masked self-paced reading with time limit (code inside Builder) (available here).

The issue that I am at is that I am trying to modify the part of the code that reads:
def replaceWithX(textList, currentWordNumber):
"
xSentence = ‘’
for index, word in enumerate(textList): # cycle through the words and their index numbers
if index != currentWordNumber:
xSentence = xSentence + ‘x’ * len(word) + ’ ’ # add a string of x characters
else:
xSentence = xSentence + word # except for the current word

return xSentence # yields the manipulated sentence

"

With this current set up, it creates frames where the missing words are "X"s, as opposed to invisible (what I am trying to achieve). Ideally, only one word analogously will appear; without any visible "X"s.

I’ll update if I figure it out.