import os
os.system('clear')
def clear():
    os.system('clear')

Using the above function, all you need to run is “clear()” (don’t forget to add the open parenthesis!) and bam: you can now clear your view!