Shorthand Python Boolean value, shorthand python Boolean Value
In python. Boolean values include true and False. True equals to true, and False equals to error. Note that uppercase and lowercase letters are strictly required in python. The first letter of true and False must be capitalized.
Boolean values can be operated on each other and are calculated using and not or (all in lower case.
And is an operation,
>>> Ture and TureTure >>>> False and TureFalse >>> False and FalseFalse
In the and operation, the result is true only when all values are true. The opposite is False.
Or is or,
>>> True or TureTure >>>> true or FalseTure >>> False or FalseFalse
In the or operation, if one is true, the result is true.
The not operation is not an operation,
>>> Not TureFalse >>> not FalseTure >>> not 1 <2 Ture
Non-calculation is a single object operator. As the name suggests, true and False are converted to each other.
Summary
The above is all about the shorthand Python Boolean value in this article. I hope it will be helpful to you. If you are interested, go to this site: Share the verification code Image Code on the Python web, crawl a Python crawler instance to get a funny Website Section, and share the code after logging on to the Python basic exercise user, if you have any questions, you can leave a message at any time. The editor will reply to you in a timely manner. Thank you for your support!