| Reference | Downloads | Github

Remove parenthesis in the text

OS (e.g. Win10): MacOS Mojave
PsychoPy version (e.g. 1.84.x): v2020.1.2
Standard Standalone? (y/n) y

What are you trying to achieve?:
I want to provide a different text, depending on whether the participant’s number is odd or even.

What did you try to make it work?:
I inserted a Code component in the same routine where Text component is inserted as follows.

if subID_n %2 == 1:
** inst1b=“Your task is A.”,**
** inst1b=“Your task is B.”,**

After then, I entered $inst1b within Text box of the Text component in the same routine.

What specifically went wrong when you tried that?:
When I ran the program and enter #1 for participant’s number, the text looks like this.

I want to remove those parentheses, comma, and small quotation marks in the text that is presented to participants.