Python 01_資源+運算符

python學習官方網站 https://www.python.org/?tdsourcetag=s_pcqq_aiomsg

**(冪運算符)3**4=3*3*3*3=81

//(相除之後取商)

%(相除之後取餘數)

運算符順序越底部,優先級越高。同一行的相同優先級

lambda  Lambda Expression
or  Boolean OR
and  Boolean AND
not x Boolean NOT
in, not in Membership tests
is, is not Identity test
<, <=, >, >=, !=, == Comparisons
| Bitwise OR
ˆ Bitwise XOR
& Bitwise AND
<<, >> Shifts
+, - Addition and subtraction
*, /, //, % Multiplication, Division, Floor Division and Remainder
+x, -x Positive, Negative
~x Bitwise NOT
** Exponentiation
x.attribute Attribute reference
x[index] Subscription
x[index1:index2] Slicing
f(arguments ...) Function call
(expressions, ...) Binding or tuple display
[expressions, ...] List display
{key:datum, ...} Dictionary display
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章