程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python 3. X learning notes - identifiers and operators

編輯:Python

One 、 identifier

    Case sensitive , Don't start with an underscore

Two 、 Operator

    division

        / Floating point numbers
        // to be divisible by
   
    An operation

        Moves to the right one = Divide 2
        The left one = multiply 2

32 Moving one bit to the right is equivalent to dividing by 2, Moving two digits to the right is equivalent to dividing by 4
32//2=32>>1
32//4=32>>2
32//8=32>>3

    Comparison operations

        Chain comparison operator

4>3>2

    Logical operators

        and or not Can only be expressed in letters

    Short circuit operator .

         Logic operation , When the result is calculated before , Don't forget the back , such as

1>2 and 2<3 and 3>4

        from 1>2=false The latter will not be able to calculate .

 

 


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved