May-24-2020, 11:12 AM
I have text form e and button wich save value of this form to global var
Thanks!
button_add = Button(root, text="+", command=button_add)Can you explain, why this code work
def button_add(): first_number = e.get() global f_num f_num = int(first_number)But this not
def button_add(): global f_num = int(e.get())Error:
Error: global f_num = int(e.get())
^
SyntaxError: invalid syntax
For me they are same, but not(Thanks!