How to clear the terminal window on mac?

I read online that I should just type “clear” but that does not work i get an error message.

Have you tried command + K?

1 Like

It looks like you’re running python in your console, and trying to get python to clear the console using a terminal command. As the error message states, ‘clear’ is not defined as a built in python function.

Not sure if this will work on a Mac, but you might try:

>>> import os
>>> os.system('clear')

Thanks that works! Thanks that works!

1 Like