"""标签:11,数字,python,break,循环,print From: https://blog.51cto.com/u_13137233/6101572
break
跳出整个循环
"""
# 首先输出数字1-10
# 如果遇到数字6就中止整个循环
for i in range(1, 11):
print(i)
if i == 6:
break
"""标签:11,数字,python,break,循环,print From: https://blog.51cto.com/u_13137233/6101572
break
跳出整个循环
"""
# 首先输出数字1-10
# 如果遇到数字6就中止整个循环
for i in range(1, 11):
print(i)
if i == 6:
break