Skip to content

Instantly share code, notes, and snippets.

@Kibouo
Kibouo / monty_hall.py
Created May 15, 2021 13:32
Monty Hall simulation
import random
random.seed(1234)
def indicate_choice(doors, choice):
return list(map(lambda tup: tup[1].upper() if tup[0] == choice else tup[1], enumerate(doors)))
GOAT = "goat"
CAR = "car"
OPEN = "open"