摘要: operator.itemgetter函数operator模块提供的itemgetter函数用于获取对象的哪些维的数据,参数为一些序号(即需要获取的数据在对象中的序号),下面看例子。a = [1,2,3]>>> b=operator.itemgetter(1) //定义函数b,获取对象的第1个域... 阅读全文
posted @ 2015-04-09 15:57 yyxayz 阅读(286) 评论(0) 推荐(0) 编辑