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 trial

Python Python Basics Types and Branching Comparisons

What is the command to drop of out of python?

how do I get back to a clear treehouse:~/workspace:$

once the console is full of lines? Forgot the command. TY!

7 Answers

If you want to "drop out" of Python, you can either push Ctrl+D, type quit(), or type exit(). Though sometimes it's easier to push Ctrl+L if you simply want to clear the screen.

Laura Lappebn
Laura Lappebn
388 Points

Thank you! It worked!

Steven Parker
Steven Parker
228,991 Points

The easiest way is to call the "quit()" function.

Then in the console, you can use the "clear" command to remove the old commands from the screen.

You can:

  • Enter "quit()" as mentioned above
  • Mac: Cntrl+D
  • Windows: Cntrl+Z then Enter

Thank you everyone. I appreciate the help from the community!

cntrl+D for both windows and mac

use Ctrl+D or quit()

Ctrl+D for Windows. Command+D for Mac. Or for both you can just type quit() or exit()

It's ctrl+D for both Windows and Macs, actually!