python-函数-写函数,接收两个数字参数,返回最大值

'''
10.写函数,接收两个数字参数,返回最大值
例如:
传入:10,20
返回:20
'''

def lst(list):
    if list[0]>list[1]:
        print(list[0])
    else:
        print(list[1])
ret=lst([10,20])

猜你喜欢

转载自www.cnblogs.com/cy-zjs/p/13194891.html