python语法_while循环

while 循环:

while 条件:

  print('''asdasd')

  print('''asdasd')

print('''asdasd')

当条件为True时,持续循环

当条件为Flase时,跳出循环

while 和else配合使用,当循环正常结束,执行else后面的代码。

 while 条件:

  。。。。

 else:

  。。。。。

猜你喜欢

转载自www.cnblogs.com/kevingm/p/9947232.html