GitHub 博客园 Nanakon
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 110 下一页

2016年8月4日

摘要: 阅读全文
posted @ 2016-08-04 13:15 jzm17173 阅读(85) 评论(0) 推荐(0)
摘要: 生成器(generator)就是对象,在每次调用它的next()方法时返回一个值,直到它抛出StopIteration 要创建一个生成器需要做的一切只是写一个普通的包含yield 语句的 Python 函数。 Python 会检测对yield 的使用并将这个函数标记为一个生成器。当函数执行到yiel 阅读全文
posted @ 2016-08-04 00:12 jzm17173 阅读(160) 评论(0) 推荐(0)
摘要: 内部函数 闭包 匿名函数 阅读全文
posted @ 2016-08-04 00:05 jzm17173 阅读(81) 评论(0) 推荐(0)

2016年8月3日

摘要: def menu(wine, entree, dessert='pudding'): return {'wine': wine, 'entree': entree, 'dessert': dessert} #位置参数 print(menu('bordeaux', 'beef', 'bagel')) #关键字参数 print(menu(entree='beef', dessert='b... 阅读全文
posted @ 2016-08-03 13:34 jzm17173 阅读(139) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2016-08-03 13:24 jzm17173 阅读(90) 评论(0) 推荐(0)

2016年8月2日

摘要: 阅读全文
posted @ 2016-08-02 13:38 jzm17173 阅读(1680) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2016-08-02 13:31 jzm17173 阅读(104) 评论(0) 推荐(0)

2016年8月1日

摘要: 阅读全文
posted @ 2016-08-01 13:35 jzm17173 阅读(136) 评论(0) 推荐(0)

2016年7月31日

摘要: TypeError: %d format: a number is required, not str python中MySQL模块TypeError: %d format: a number is required, not str异常解决 Insert NULL PyMySQL Insert N 阅读全文
posted @ 2016-07-31 23:25 jzm17173 阅读(115) 评论(0) 推荐(0)
摘要: import subprocess subprocess.getoutput('date') # python3 getoutput方法 import multiprocessing import time import os def whoami(name): print("I'm %s, in process %s" % (name, os.getpid())) def... 阅读全文
posted @ 2016-07-31 21:38 jzm17173 阅读(98) 评论(0) 推荐(0)
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 110 下一页

导航

轻音