1. 程式人生 > >python 11day--python基礎總結:運算子、流程控制及資料型別總結

python 11day--python基礎總結:運算子、流程控制及資料型別總結

一、python的運算子:

1、算數運算:加、減、乘、除、求餘、求商、x的y次方

2、邏輯運算:and、 or 、not

3、比較運算子:等於、不等於、大於、小於、大於等於、小於等於

4、賦值運算子:加賦值、減賦值、乘賦值、除賦值、求餘賦值、求商賦值、x的y次方賦值、普通賦值

5、成員運算子 :in、notin

6、位運算:與、或、異或、取反、左移、右移

7、身份運算:is、is  not

二、python的資料型別總結:

1、數字

2、bool值

3、字串

4、列表

5、元組

6、字典

7、集合

三、流程控制:

1、if  elif  else

2、while break continue

3、for