Aug-04-2019, 11:07 AM
It depends on what you are trying to do with
You would have a better time using classes for GUI code.
weights = np.array([a])If you moved it to the function it would be created when the callback happens
def callback(event): a = [float(w1.get()),float(w2.get()),float(w3.get()),float(w4.get())] print(a) weights = np.array([a])but you would not be able to access weights outside of the call back.
You would have a better time using classes for GUI code.