判断三个数的最大值最小值(Python)

def max_min(x, y, z):
    max = min = x
    if y > max:
        max = y
    else:
        min = y
    if z > max:
        max = z
    else:
        min = z
    return (max, min)

print(max_min(15, 10, 39))

    原文作者:LIJZ_Python
    原文地址: https://blog.csdn.net/yinhangxitong36/article/details/79469181
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞