Python min() FunctionPython min() function is used to get the smallest element from the collection. This function takes two arguments, first is a collection of elements and second is key and returns the smallest element from the collection. SignatureParameterscollection: It is a comma-separated list of elements. key: Specifies a one-argument ordering function. ReturnIt returns the smallest element from the collection. Let's see some examples of min() function to understand it's functionality. Python min() Function Example 1A simple example to get the smallest element from the collection. See the below example. Output: 325 1000.25 Python min() Function Example 2Output: A [10, 12] Python min() Function Example 3Output: Java [13, 15] Next TopicPython Functions |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India