If you cant explain it simply, you dont understand it well enough

摘要: python 常用操作 1. 读取文件 或者 打开文件覆盖写 fd_pre = open(PRE_FILE, "w+") if not fd_pre.read(): fd_pre.write('tes11\n') else: fd_pre.write('tes11\n') 2. 字典删除一个key 阅读全文
posted @ 2016-08-09 20:24 zk47 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Python stackoverflow 1. 基本问题 1.1 判断一个list 是否为空 链接 "地址" a = [] if not a: ... print "empty" 对于元组,字典,字符串对象都可以这么操作,会显得 quite pythonic 1.2 怎么给一个字典排序 链接 "地址 阅读全文
posted @ 2016-08-09 20:22 zk47 阅读(440) 评论(0) 推荐(0) 编辑

I am a stupid bird, and I need to work hard