- Mastering Python Scripting for System Administrators
- Ganesh Sanjiv Naik
- 87字
- 2021-07-02 14:00:25
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.
推薦閱讀
- 深入淺出WPF
- ASP.NET Core Essentials
- Learning Informatica PowerCenter 10.x(Second Edition)
- SQL語言從入門到精通
- Python編程完全入門教程
- Learning ArcGIS Pro
- 算法訓(xùn)練營:提高篇(全彩版)
- Mastering C++ Multithreading
- INSTANT Adobe Edge Inspect Starter
- GameMaker Essentials
- Mastering HTML5 Forms
- R的極客理想:量化投資篇
- Python機器學(xué)習(xí)開發(fā)實戰(zhàn)
- 3D Printing Designs:The Sun Puzzle
- Learning Alfresco Web Scripts