import random def trial_election(win_chance): if random.random() < win_chance: return \'win\' else: return \'lose\' region_1 = trial_election(0.87)