Jun-18-2018, 08:58 PM
I think I'd rather write
get_ghost()
like this, so it's obvious that it always returns a list:def get_ghost(): ghost = [] while len(ghost) < 2: rnd = randint(1, doors) if rnd not in ghost: ghost.append(rnd) return ghost