摘要: 1 #-*-coding:utf-8-*- 2 3 #1、字典 4 dict = {'name': 'Zara', 'age': 7, 'class': 'First'} 5 6 #字典转为字符串,返回: {'age': 7, 'name': 'Zara', 'class': 'First'}... 阅读全文
posted @ 2014-09-19 21:36 tobeprogramer 阅读(16792) 评论(0) 推荐(0)
摘要: 1 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 #coding:utf-8 2 3 #Python的线程池实现 4 5 import... 阅读全文
posted @ 2014-09-19 21:32 tobeprogramer 阅读(722) 评论(0) 推荐(0)
摘要: (转载):因为要用python做学校网络的认证程序,需要解析服务器传回的html,本以为会像javascript里操作DOM那样简单,结果发现并不是 这样,被搞了一下。其实python里面有xml.dom模块,但是这次却不能用,为啥呢?因为服务器传回的html从xml角度看不是良构的,没有闭合的标签... 阅读全文
posted @ 2014-09-19 14:37 tobeprogramer 阅读(443) 评论(0) 推荐(0)