Experiment info combines with code to run the same experiment with different parameter setting

In the experiment, I wanna achieve that when the phase of the experiment is different, the materials will be changed.
In a word, how to combine the code with the experiment information?

How about something like

if expInfo[‘group’] == ‘1’:
      conditionsFile = ‘group1.xlsx’
elif expInfo[‘group’] == ‘2’:
      conditionsFile = ‘group2.xlsx’