标签:demo port coding turn utf-8 too UNC code ret
demo:
#coding:utf-8 from functools import cmp_to_key def cmp1(x,y): if x[0]==y[0]: return y[1]-x[1] else: return x[0]-y[0] A=[[1,2],[3,1],[2,2],[2,1]] A=sorted(A,key=cmp_to_key(cmp1),reverse=True) print(A)
标签:demo port coding turn utf-8 too UNC code ret
原文地址:https://www.cnblogs.com/elpsycongroo/p/9902913.html