会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
GitHub
博客园
Nanakon
jzm17173
上一页
1
···
23
24
25
26
27
28
29
30
31
···
110
下一页
2016年8月4日
__
摘要:
阅读全文
posted @ 2016-08-04 13:15 jzm17173
阅读(85)
评论(0)
推荐(0)
Python 生成器
摘要: 生成器(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)
None
摘要:
阅读全文
posted @ 2016-08-03 13:24 jzm17173
阅读(90)
评论(0)
推荐(0)
2016年8月2日
使用range()生成自然数序列
摘要:
阅读全文
posted @ 2016-08-02 13:38 jzm17173
阅读(1680)
评论(0)
推荐(0)
使用zip()并行迭代
摘要:
阅读全文
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日
pymysql
摘要: 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
下一页
公告
导航
博客园
首页
联系
订阅
管理