The end parameter in the Python print() function controls what is printed at the end of the output.
By default, print() appends a newline character (\n), so each print() call starts on a new line. 1
You can change this behavior by specifying a different value for end.
This is used for terminals that support ANSI escape codes, you can use a sequence to clear the screen.
This is an example of Using os.system:
You can use the os.system function to issue a system-specific command to clear the screen
It checks to see if you're on windows (nt) or another operating system