python 基础学习

学习了Python的 条件语句和循环语句

if 判断条件:

  执行语句……

else

  执行语句……

 

while 判断条件(condition):

  执行语句(statements)……

 

for iterating_var in sequence:

statements(s)

Python for 循环嵌套语法:

for iterating_var in sequence:
  for iterating_var in sequence:
    statements(s)
  statements(s)

Python while 循环嵌套语法:

while expression:
  while expression:
    statement(s)
  statement(s)
 
posted on 2020-10-17 15:03  季昂  阅读(85)  评论(0编辑  收藏  举报