码迷,mamicode.com
首页 > 编程语言 > 详细

python循环打印

时间:2016-10-03 12:52:18      阅读:182      评论:0      收藏:0      [点我收藏+]

标签:

技术分享
 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 += 1
10     if count >50 and count<60 :
11         continue
12     print("你是风儿我是沙,缠缠绵绵到天涯",count )
13     ‘‘‘
14     else:
15         print ("This is a diedloop?",count)
16     count += 1
17     ‘‘‘
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.py

count=0
while 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循环打印

标签:

原文地址:http://www.cnblogs.com/derby/p/5928932.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!