python - What does this if .. and not statement mean? -
what following code mean:
if next == "taunt bear" , not bear_moved
bear_moved filled value of false.
i've read post: what "if" statement mean? explains , 'and' operator tests truth on both sides. if so, code say, if next equal "taunt bear" , bear_moved not true?
it's checking see if next
equal "taunt bear"
, checking if bear_moved
falsey (a falsey value means evaluates false, truthy means evaluate true). long next
equal "taunt bear"
, bear_moved
if not truthy, if statement succeed.
Comments
Post a Comment