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 console using "Clear Console" option.
Is there a way out to clear the printed statements in Python console using a command? I tried the following from this answer
qgis.console.clearConsole()
But I am getting this error message:
AttributeError: 'module' object has no attribute 'console'