Python3 List max()方法
Python 3 教程
· 2019-02-06 11:26:31
描述
max() 方法返回列表元素中的最大值。
语法
max()方法语法:
max(list)
参数
- list -- 要返回最大值的列表。
返回值
返回列表元素中的最大值。
实例
以下实例展示了 max()函数的使用方法:
#!/usr/bin/python3
list1, list2 = ['Google', 'Codercto', 'Taobao'], [456, 700, 200]
print ("list1 最大元素值 : ", max(list1))
print ("list2 最大元素值 : ", max(list2))
以上实例输出结果如下:
list1 最大元素值 : Taobao list2 最大元素值 : 700
点击查看所有 Python 3 教程 文章: https://www.codercto.com/courses/l/10.html
Reality Is Broken
Jane McGonigal / Penguin Press HC, The / 2011-1-20 / USD 26.95
Visionary game designer Jane McGonigal reveals how we can harness the power of games to solve real-world problems and boost global happiness. More than 174 million Americans are gamers, and......一起来看看 《Reality Is Broken》 这本书的介绍吧!
CSS 压缩/解压工具
在线压缩/解压 CSS 代码
html转js在线工具
html转js在线工具