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 trialStephani Dudrak
1,614 Points'clear' command doesn't work in REPL?
Following along with the lesson in the Console box, which is getting crowded, tried to use 'clear' and got a NameError: name 'clear' is not defined Why is this? and is there another way to clear the REPL aside from closing and reopening?
4 Answers
Jesse Antonio
293 PointsYou can do 'Control L' to clear REBL
robertdorgan
5,944 Pointscontrol D drops you out of the REPL, whereas control L with clean up your screen (your previous lines of code are still in your practice session, and you can retrieve them by pressing the up arrow)
Pedro Cabral
33,586 PointsHave you tried?
import os;os.system("clear")
Faraz Jahangiri
1,028 Pointspress control D to exit the REPL and then type in clear