You can also do this via css and ajax. I do it this way, so i can create a few simple classes for my cursors, and then just use addClass or removeClass whenever an event occurs that I need to change the cursor (click, hover, alert, etc.)
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: