求最小:
def getThreeNumberMin(x,y,z):min=x if x<y else ymin=min if min<z else zreturn min
a=getThreeNumberMin(3,-1,-1)
print(a)
结果:
求最大:
def getThreeNumberMin(x,y,z):max=x if x>y else ymax=max if max>z else zreturn max
a=getThreeNumberMin(3,3,-1)
print(a)