You sholdn't need to; it is part of the standard Python library. I gather you were unable to use it? What version of Python are you using? What exactly happens if you enter the following into the Python interpreter prompt?
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: