Booleans in If Statements in Python
This question already has an answer here:
The fragment
def Startup():
global PasswordSkip
does not declare PasswordSkip to be global everywhere. It declares that within this function, references to setting PasswordSkip should be taken to be the global variable PasswordSkip rather than some local variable.
Now in the function PasswordRemove , you do not declare that PasswordSkip is a global to be brought into scope. Thus statements like PasswordSkip = True are setting a local variable PasswordSkip
下一篇: 布尔如果在Python中声明
