![图片[1]-python里的max函数怎么用-uusu优素-乐高,模型,3d打印,编程](http://uusucn.zbbe.cn/wp-content/uploads/2024/01/5e732516636b0614.jpg)
python中的max() 方法返回给定参数的值,参数可以为序列。
以下是 max() 方法的语法:
max(x,y,z,....)
参数
x--数值表达式。 y--数值表达式。 z--数值表达式。
例如
print"max(80,100,1000):",max(80,100,1000) print"max(-20,100,400):",max(-20,100,400) print"max(-80,-20,-10):",max(-80,-20,-10) print"max(0,100,-400):",max(0,100,-400)
结果
max(80,100,1000):1000 max(-20,100,400):400 max(-80,-20,-10):-10 max(0,100,-400):100原文来自:https://www.py.cn
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
















































暂无评论内容