sites = ["Baidu", "Google","Runoob","Taobao"]
# for i in sites:
# if i =="Runoob":
# print("菜鸟教程")
# break # 这个break,跳出当前循环体(此处为for i in site 循环,跳出喉,执行further的语句块
# else:
# print("循环数据"+ i)
#
# print("完成循环")
# (2)自写,果然简单的结构放在上面,条例会更清晰
for i in sites:
if i != "Runoob": 此处的简单结构为"!=" ,if i != "Runoob "
print("循环数据"+i)
else:
print("菜鸟教程")
break
print("完成循环")