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

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.

主站蜘蛛池模板: 儋州市| 南城县| 新乡县| 甘肃省| 普安县| 沙洋县| 方城县| 横峰县| 萝北县| 巴林左旗| 灵台县| 华容县| 新乡县| 德惠市| 威宁| 班玛县| 全椒县| 云浮市| 旅游| 青岛市| 昭平县| 巴马| 曲周县| 奉贤区| 镇原县| 桓台县| 武陟县| 沾化县| 淅川县| 乐清市| 石台县| 佳木斯市| 章丘市| 博兴县| 句容市| 林口县| 上犹县| 锦州市| 卢龙县| 丹寨县| 焉耆|