官术网_书友最值得收藏!

max() and min()

Using the max() and min() functions, we can find the highest and lowest values from the tuple. These functions allow us to find out information about quantitative data. Let's look at an example:

>>> numbers = (50, 80,98, 110.5, 75, 150.58)
>>> print(max(numbers))
150.58
>>>

Using max(), we will get the highest value in our tuple. Similarly, we can use the min() function:

>>> numbers = (50, 80,98, 110.5, 75, 150.58)
>>> print(min(numbers))
50
>>>

So, here we are getting the minimum value.

主站蜘蛛池模板: 突泉县| 新民市| 旺苍县| 青浦区| 临漳县| 剑阁县| 天台县| 巢湖市| 宽城| 河南省| 襄垣县| 禄丰县| 武冈市| 永和县| 钟祥市| 蚌埠市| 自贡市| 崇文区| 南江县| 介休市| 太仓市| 察雅县| 惠州市| 吴堡县| 定兴县| 石首市| 太谷县| 襄垣县| 朔州市| 额尔古纳市| 德庆县| 六盘水市| 启东市| 原阳县| 博白县| 禄丰县| 平利县| 义马市| 明溪县| 贞丰县| 黔南|