What do I need to do if I want to clear the console without OS-Limitations? I know that on Linux and Mac the command "clear" exists, whereas Windows has "cls". I want to clear the console every now and then on the three major systems without personally choosing "clear" or "cls".
My idea so far was
import platform
os = platform.system()
if os == "Windows":
clear = 'cls'
else:
clear = 'clear'
and then just use clear as variable for both, depending on the OS, but it doesn't work. Is something like this actually possible?