Exit Python REPL (on Mac) with Control-D

Quick tip that I just learned (from a Pluralsight video) is that you can exit the Python REPL in Mac’s Terminal by pressing Control and D instead of having to type exit() and hit enter, which is a bit clumsier. Control and C halts any process that might be taking a while so I’m hoping it’ll be easy to remember Control + D for exiting the REPL.