system() is portable -- the commands it execute are not. There are no portable ways to clear the screen. You might have to do something like this, where each compiler for the target os defines one of the symbols listed in the code below.
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: