I'm developing a python script in which I use several "print" statements to view the intermediate results in python console of QGIS. Each time after executing the program, I have to manually clear the python console using "Clear Console" option.
Is there a way out to clear the printed statements in python console using a command?
I tried using the following command from this answer
qgis.console.clearConsole()
But I am getting this error message
AttributeError: 'module' object has no attribute 'console'