I made a simple window with some buttons usin Tkinter. One button is in the disabled state at the begining, but I want it to turn into a normal state again after I press another button. So how can I change the button's properties while the code is running?
from tkinter import *
def com():
print ('activate')
def win():
window = Tk()
window.geometry ('500x500')
b1 = Button(text = 'Disabled', pady = '10', padx = '10', state = DISABLED)
b1.place(x=100, y=10)
b2 = Button(text = 'activate', pady = '10', padx = '10', command=com)
b2.place(x=10, y=10)
window.mainloop
win()