Damn I'm such a dumbass, wasn't using htmlentities() so the <form part was recognized as HTML and therefore not printed to the screen. Sorry! This thread may be deleted, locked, etc. but I can't find a way to do so myself.
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: