the text is most likely not formatted in any meaninful way and fscanf will be difficult if not impossible to use.
use fgets() to read the file line by line.
use strtok() to parse each element (or token) in the line by delimiting each element by the spaces (' ')
use strtol() to determine if element is an integer and convert it
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: