摘要:
转载于:http://yxmhero1989.blog.163.com/blog/static/112157956201381443244790/Python很简洁 我们喜欢简单有效的代码 一.{}.fromkeys(list).keys()list2 = {}.fromkeys(list1).keys()二.setlist2 = list(set(list1))三.itertools.groubyids = [1,4,3,3,4,2,3,4,5,6,1]ids.sort()it = itertools.groupby(ids)for k, g in it: print k四,笨方法id... 阅读全文