The trick to understanding the Monty Hall problem isn’t to run it 1000 times, it’s to imagine it with 1000 doors. Thinking about the problem with an arbitrarily large number of doors make the solution intuitively obvious. No code required.
This is materially the same as being given a choice between opening one door randomly, or being able to open every other door. Because the conditions of opening doors prior to the final choice is that the door you initially picked can’t be opened at this phase, and neither can the winning door.
Now set N to 3, and consider that, by opening a door without the prize, that's exactly what Monty's offering you.