标签:命令 16px 无限 重复 strong 无限循环 1.2 int loop
while循环的本质就是让计算机在满足某一条件的前提下去重复做同一件事情(即while循环为条件循环,包含:1.条件计数循环,2条件无限循环)
1.1计数循环
count=0
while (count < 9):
print(‘the loop is %s‘ %count)
count+=1
1.2无限循环
count=0
while True:
print(‘the loop is %s‘ %count)
count+=1
1.3while与break,continue,else连用
标签:命令 16px 无限 重复 strong 无限循环 1.2 int loop
原文地址:http://www.cnblogs.com/hanxiaofeicf/p/7214234.html