Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSkylar Claypool
507 PointsHow do you "drop out" of the console if you want to move on to run a new line a code?
Does anyone know how Craig "Drops Out" of the next to run a new line of code?
5 Answers
Peter Vann
36,427 PointsHi Skylar!
On MacOS (and Linux), you can type exit() and press Enter or use the Ctrl + D shortcut keys. (Note: Ctrl and NOT Cmd) (Also, works in the terminal Python REPL the same way.)
In Windows, type Ctrl+Z and press Enter:
More info:
https://realpython.com/interacting-with-python/
(Scroll down to "Exiting the Interpreter")
I hope that helps.
Stay safe and happy coding!
Peter Vann
36,427 PointsHi Skylar!
For the record, I HATE it when a video tutor does something like use shortcut keys without explaining what has happened off-screen. I have been similarly baffled and frustrated when key tips like that are left out by the instructors.
For me, it often happens when they are explaining how to set up a dev environment on a local system. If one KEY detail is left out, 9 times out of 10, I can't get the environment working.
Been there, done that, have the T-shirt!?! LOL
I hope that helps.
Stay safe and happy coding!
Jennifer Nordell
Treehouse TeacherHi there, Peter Vann! I would like to point out that the CTRL + D was introduced in a course that should have been taken before this one. You can find the reference in this video at around the 5:19 mark
Skylar Claypool
507 Pointsthank you! CTRL + D worked!
Peter Vann
36,427 PointsBy the way, I don't know what code editor you generally use, but I highly recommend getting VERY familiar with shortcut keys in it. Knowing them can speed up a lot of your coding and save you a world of hurt!?! (And for your operating system in general, too.)
Also, look into things like Emmet and Dash for Mac (if you use a Mac)!?!
I hope that helps.
Stay safe and happy coding!
`
Skylar Claypool
507 PointsHi Jennifer,
I knew he mentioned it before, but didn't want to dig too much and thought I could just get an answer on here faster. Thank you for the comment though!