how to disable button when pressed in tkinter code example Example: make tkinter button disable button['state'] = 'disabled'