去除python list中的重复值
在一篇很牛的介绍python中list去重的博客(http://www.peterbe.com/plog/uniqifiers-benchmark)中收集到的:from random import shuffle, randintimport refrom sets import Setdef f1(seq): # Raymond Hettinger # not order preserving set = {} map(set.__setitem__, seq,
原创
2011-01-16 20:38:00 ·
2470 阅读 ·
0 评论