How to use the max function in python
This article mainly introduces the relevant knowledge of how to use the max function in python, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value, I believe you will have something to gain after reading this article on how to use the max function in python. Let's take a look.
Specific usage:
1. First open the python editor and create a new python project.
2. Use the max function in the python project to get the maximum value of the specified parameter.
Min (100,110,1000)
Output result:
one thousand
Example code:
#! / usr/bin/python
# www.xieniao.com
Print "max (80,100,1000):", max (80,100,1000)
Print "max (- 20,100,400):", max (- 20,100400)
Print "max (- 80,-20,-10):", max (- 80,-20,-10)
Print "max (0,100,400):", max (0,100,400)
Output result:
Max (80,100,1000): 1000
Max (- 20,100,400): 400
Max (- 80,20,-10):-10
Max (0,100,400): 100
This is the end of the article on "how to use the max function in python". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to use the max function in python". If you want to learn more knowledge, you are welcome to follow the industry information channel.