2015年1月14日

python的operator.itemgetter('click')用于定义获取'click'项的函数

摘要: python的排序参见文章http://blog.csdn.net/longshenlmj/article/details/12747195 这里介绍 import operator模块 operator的itemgetter函数用于获取传入参数中某个域的值,如 a = [1,2,3]... 阅读全文

posted @ 2015-01-14 16:44 代码王子 阅读(111) 评论(0) 推荐(0)

linux的wc -l 命令统计文件少一行(一般是windows文件)

摘要: 先简单介绍 wc(Word Count)命令的功能为统计指定文件中的字节数、字数、行数,并将统计结果显示输出 格式:wc file 命令参数: -c 统计Bytes数(字节数),并显示文件名 -l 统计行数:使用换行符‘\n’作为行结束标志,实际是统计换行符个数 -m 统计字符数。这个标志不能与... 阅读全文

posted @ 2015-01-14 11:57 代码王子 阅读(2555) 评论(0) 推荐(0)

导航