Conditional routine based on ExpInfo

Before the experiment starts the experiment info dialog asks the participants’ number and the condition they are in (either 1 or 2). I want to have a condition for a routine, that displays a slider, but only when the condition is equal to 2.
Can someone help me? Thank you in advance!
Best,
Emma

Add the following in a Begin Routine tab of the slider routine

if expInfo['condition'] != '2':
     continueRoutine=False

Thank you very much! Your solution works perfectly.