There are 5 outputs before the clearing operation takes place. But when I used os.system(“cls”) it doesn’t work. The console isn’t cleared and the lines below this command are executed.
I’m using Windows.
Tried a lot of ways, even on StackOverflow, but couldn’t get any proper solution. Also, is there any way to open cmd using python code and run another python program?
This is what I have written:
import os
#previous outputs using print()
os.system("cls")
print("Finished")
This won’t work properly.