python中的循环

while 条件表达式

  循环体

 

import time  # 导入时间对象
x = 1
while True:
    print("Bb", end="->")
    # print("AA")
    time.sleep(0.5)  # 睡一会
    x += 1
    if x > 5:
        break
print("[end]")

 

posted @ 2018-04-21 11:06  奎哥python  阅读(124)  评论(0)    收藏  举报