赞
踩
import random
class Temp:
def __init__(self, a, b, c):
self.a = a
self.b = b
self.c = c
def __str__(self):
return ( ('[a: %d b: %d c: %d]' % (self.a, self.b, self.c)))
def cmp1(temp1, temp2):
if (temp1.a > temp2.a):
return 1;
elif(temp1.a == temp2.a):
if (temp1.b>temp2.b):
return 1;
elif(temp1.b == temp2.b):
return 0;
else:
return -1;
else:
return -1;
def cmp2(temp1):
return temp1.a
temp = []
<
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。