08 2017 档案

摘要:for i in range(10): if i==5: continue #跳出当次循环 if i==8: break #跳出整个for循环 print(i) 阅读全文
posted @ 2017-08-31 20:45 糖宝虫 阅读(140) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2017-08-22 23:35 糖宝虫 阅读(1) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2017-08-20 23:19 糖宝虫 阅读(1) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2017-08-08 00:12 糖宝虫 阅读(5) 评论(0) 推荐(0)
摘要:name:lysother1other2other3e:10000c:sexd:Japan 这里还有一个关于赋值的问题: 阅读全文
posted @ 2017-08-07 00:11 糖宝虫 阅读(162) 评论(0) 推荐(0)
摘要:#生成器def MyDemo(M): for i in range(M): yield i**2for item in MyDemo(9): print(item)# #生成器import sysa=(i**2 for i in range(5))while True: try: print(nex 阅读全文
posted @ 2017-08-03 21:26 糖宝虫 阅读(123) 评论(0) 推荐(0)
摘要:#迭代器import syslist=[1,2,3,4]it=iter(list)while True: try: print(next(it)) except StopIteration: sys.exit() #迭代器it=iter(list)print(next(it))print(next( 阅读全文
posted @ 2017-08-03 19:43 糖宝虫 阅读(97) 评论(0) 推荐(0)
摘要:import threadingimport time#继承 class threading.Threadclass MyThread(threading.Thread): #类做初始化 def __init__(self,name): #调用hreading.Thread.__init__(sel 阅读全文
posted @ 2017-08-01 21:13 糖宝虫 阅读(133) 评论(0) 推荐(0)