Prize = namedtuple('Prize', ['left', 'right'])
this_prize = Prize('FirstPrize', 'SecondPrize')
if random.random() > 0.5:
    choice = 'left'
else:
    choice = 'right'
print('You won', getattr(this_prize, choice))
Python: Accessing an attribute using a variable