print,import

Python Conditionals and Loops
Python Conditionals and Loops

赋值

Python Conditionals and Loops
Python Conditionals and Loops

条件和条件语句:布尔值、bool函数、if、else、elif

Python Conditionals and Loops
Python Conditionals and Loops

嵌套代码块、相等运算符==、同一性运算符is、成员资格运算符in、字符串和序列比较、布尔运算符、断言

Python Conditionals and Loops
Python Conditionals and Loops
Python Conditionals and Loops

while、for、range

Python Conditionals and Loops
Python Conditionals and Loops
Python Conditionals and Loops

并行迭代、编号迭代、翻转和排序迭代

Python Conditionals and Loops
Python Conditionals and Loops
Python Conditionals and Loops

break、continue、循环中else子句

Python Conditionals and Loops
 

列表推导式(List Comprehension)
Python Conditionals and Loops
 

pass、del、exec、eval

pass语句什么都不做,可以作为占位符使用。

del语句用来删除变量,或者数据结构的一部分,但是不能用来删除值。

exec语句用于执行Python程序相同的方式来执行字符串。

内建的eval函数对写在字符串中的表达式进行计算并且返回结果。

Python Conditionals and Loops
Python Conditionals and Loops
Python Conditionals and Loops
 

summary

Python Conditionals and Loops
 

 

 

 

 

相关文章: