To clear the console we can use the following command -
import subprocess as sp tmp = sp.call(\'cls\',shell=True)
However, to remove a vari
In Spyder, Do following steps Run Configuration per file... Clear all variables before execution [Select Checkbox] This actually clears variables from previous run of the file. Hope it helps.