for 循环

#!/usr/bin/python3

sites = ["Baidu", "Google","Runoob","Taobao"]

for site in sites:

if site == "Runoob":

print("hello world!")

break

print("循环数据 " + site)

else:

print("没有循环数据!")

print("完成循环!")

posted @ 2021-01-07 14:43  杜广超  阅读(72)  评论(0)    收藏  举报