Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
216,865 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!