首页 > 代码库 > python循环打印

python循环打印

技术分享
 1 #!/usr/bin/env python 2 # -*- coding: utf-8 -*- 3 # @Time    : 2016/10/2 15:47 4 # @Author  : Derby 5 # @File    : whileloop.py 6  7 count=0 8 while True: 9     count += 110     if count >50 and count<60 :11         continue12     print("你是风儿我是沙,缠缠绵绵到天涯",count )13     ‘‘‘14     else:15         print ("This is a diedloop?",count)16     count += 117     ‘‘‘18     if  count==100:19         print("Haha,This is good loop!")20         break
print 打印

 测试另外代码查看方式

方式一:

#!/usr/bin/env python# -*- coding: utf-8 -*-# @Time    : 2016/10/2 15:47# @Author  : Derby# @File    : whileloop.pycount=0while True:    count += 1    if count >50 and count<60 :        continue    print("你是风儿我是沙,缠缠绵绵到天涯",count )    ‘‘‘    else:        print ("This is a diedloop?",count)    count += 1    ‘‘‘    if  count==100:        print("Haha,This is good loop!")        break

  

python循环打印