阅读背景:

Python基础学习(九) ------ 循环跳出 / 错误处理 / zip / lambda / map_千喜

来源:互联网 

一.跳出循环

a=True
while a:
    b= input('type somesthing')
    if b=='1':
        a= False
    else:
        pass
print ('finish run')

''''
type somesthing:2
still in while
type somesthing:3
still in while
type somesthing:1
still in while    #会执行下面的语句再跳出
finish run
''''a=True
while a:
    b= input('type som



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: