Text Component is not presenting the way I want it to (presents entire list twice before moving on to the next trial)

I figured out a solution!

the code component in the Facts_present routine should be as follows:

In the Begin Experiment tab add this code:

AnswerStore # Or your variable with your list of items
trial_num = 0  # Trial counter
current_item = ''  # # Variable to hold the current item

In the Begin Routine tab add this code:

# In Begin Routine, assign the current item for the first trial
if trial_num < len(AnswerStore):
    current_item = AnswerStore[trial_num]  # Get the current item from the list
else:
    continueRoutine = False  # End the loop if no items are left

In the End Routine tab add this code:

trial_num += 1  # Move to the next item for the next trial

Most Importantly, You must add a Text component in the Facts_present routine that references the current item in the text, like so :
Screenshot 2024-09-12 170412

And this text component must be placed AFTER the code component in your routine:

I don’t know why but if it was placed anywhere else the first item on the list will not be shown.

Thank you @wakecarter and @umb who responded to my previous post and put me on the path to solve this issue, your help in much appreciated!