python try: except: ---处理死循环


如:

while(1):
    try:
        print(input().lower())
    except:
        break

相关