6.0分支、循环、条件与枚举
while循环写法
while codition:
passwhile codition:
pass
else:
passfor循环遍历
for target_list in expression_list:
passa=['apple','orange','banana','grape']
for x in a:
print(x)a=[['apple','orange','banana','grape'],(1,2,3)]
for x in a:
for y in x:
print(y)for循环计数
循环中断
Last updated