I just recently joined the python3 HypeTrain. However I just wondered how you can use an if statement onto a boolean. Example:
RandomBool = True
# and now how can I check this in an if statement? Like the following:
if RandomBool == True:
#DoYourThing
And also, can I just switch the value of a boolean like this?
RandomBool1 == True #Boolean states True
if #AnyThing:
RandomBool1 = False #Boolean states False from now on?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…