Dec-17-2019, 03:34 PM
I am trying to get the value from "edit", but I can't seem to get it to work.
File "c:\Users\Albert\Desktop\retarded\kalkulator_gui.py", line 67, in knapp_1
if edit == 0:
NameError: name 'edit' is not defined
Is there something other than "global" that I can use to get the value?
edit = 0
def knapp_1(self):
global edit
if edit == 0:
edit = 1
else:
edit = edit * 10 + 1
self.tall_input.setPlainText(str(edit))When i run the code, I get the error:File "c:\Users\Albert\Desktop\retarded\kalkulator_gui.py", line 67, in knapp_1
if edit == 0:
NameError: name 'edit' is not defined
Is there something other than "global" that I can use to get the value?
