
python
文章平均质量分 50
zhang_jianzhi
喜欢安静。。。。
展开
-
python模块安装
easy_install (文件路径)\lxml-2.3.py2.7.win32.egg转载 2014-04-29 20:06:50 · 554 阅读 · 0 评论 -
python 中strftime用法
"""8.strftime(...) strftime(format[, tuple]) -> string 将指定的struct_time(默认为当前时间),根据指定的格式化字符串输出 python中时间日期格式化符号: %y 两位数的年份表示(00-99) %Y 四位数的年份表示(000-9999) %m 月份(01-12) %d 月内中的一天(0-31) %H原创 2014-04-11 10:36:26 · 3709 阅读 · 0 评论 -
python with...as用法
转自:http://blog.youkuaiyun.com/elevenqiao/article/details/6796653 with从Python 2.5就有,需要from __future__ import with_statement。 自python 2.6开始,成为默认关键字。 在What's new in python2.6/3.0中,明确提到: The ‘ with ‘ stat转载 2014-04-11 10:47:32 · 503 阅读 · 0 评论 -
python的string操作总结
转自 http://bbs.linuxpk.com/archiver/tid-35329.html在python有各种各样的string操作函数。在历史上string类在python中经历 了一段轮回的历史。在最开始的时候,python有一个专门的string的module,要使用string的方法要先import,但后来由于众多的 python使用者的建议,从python2.0开始, strin转载 2014-04-26 15:49:47 · 609 阅读 · 0 评论 -
Python,itertool的ifilter
https://docs.python.org/2.7/library/itertools.html itertools红 ifilter() pred, seq elements of seq where pred(elem) is true ifilter(lambda x: x%2, range(10)) --> 1 3 5 7 9原创 2014-04-25 18:05:30 · 1745 阅读 · 0 评论 -
python中的maketrans和translate
参考:http://wangwei007.blog.51cto.com/68019/1242206 maketrans和translate在yo转载 2014-04-28 16:29:03 · 565 阅读 · 0 评论