Review Python BASICS (6)

Source: Internet
Author: User
    1. The first three symbols are not expressed in this way in Java and C ,! Expression)

      • And
      • Or
      • Not
      • ! =(Not equal)
      • =(Equal)
      • > =(Greater-than-equal)
      • <=(Less-than-equal)
      • True
      • False
View code

 #  _ * _ Coding: UTF-8 _*_  Print (True And False), false  Print (False And  True), false  Print (1 = 1 And 2 = 1 ), False  Print ( "  Test  " = "  Test  "  ), True Print (1 = 1 Or 2! = 1 ), True  Print (True And 1 = 1 ), True  Print (False And 0! = 0), false  Print (True Or 1 = 1 ), True  Print ( " Test  " = "  Testing  "  ), False  Print (1! = 0 And 2 = 1 ), False  Print ( "  Test  " ! = "  Testing  " ), True  Print ( "  Test  " = 1 ), False  Print   Not (True And  False), true  Print   Not (1 = 1 And 0! = 1 ), False  Print   Not (10 = 1 Or 1000 = 1000 ), False  Print   Not (1! = 10 Or 3 = 4 ), False  Print   Not ( "  Testing  " = "  Testing  "   And  "  Zed  " = "  Cool guy  "  ), True  Print   Not (1 = 1 And   Not ( "  Testing  " = 1 Or 1 = 0), false Print   Not ( "  Chunky  " = "  Bacon  "   And   Not (3 = 4 Or 3 = 3 ), True  Print (3 = 3 And   Not ( " Testing  " = "  Testing  "   Or   "  Python  " = "  Fun  "  ), False  Print   "  Test  "  And   "  Test  "   #  Output test, boolean operators and or will output content on both sides of the operator, instead of true and false  Print   "  Test  "   Or   "  Test  "  Print   Not ( " Test  "   And   "  Test  " )
View code

 
False falsefalse falsetrue truetrue truefalse falsetrue truefalse falsefalse falsetrue truefalse falsetesttestfalse

Note "test" and "test" = "test", instead of 1. Or

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.