我最近加入了Python 3催眠器.然而,我只是想知道如何在布尔值上使用if语句.例子:
RandomBool = True
# and now how can I check this in an if statement? Like the following:
if RandomBool == True:
#DoYourThing
还有,我能像这样切换布尔值吗?
RandomBool1 == True #Boolean states True
if #AnyThing:
RandomBool1 = False #Boolean states False from now on?