How Can We Help?
Introduction:
In this tutorial, we are going to explain how to use Python min of list function with basic syntax and many examples for better understanding.
Python min of list is used to get a minimum value of a list.
Syntax:
min(list_variable_name)
Input Parameters:
- list_variable_name : where list is a list variable whose type needs to be found.
Example
number=[1,2,3] alphanumeric=['x','A','abc'] # minimum value of list print('min of number:', min(number)) print('min of alphanumeric:', min(alphanumeric))
Output
min of number: 1
min of alphanumeric: A
In the above Example, If comparing values of list variable ‘number’ ,value ‘1’ is smaller than value ‘2’ and ‘3’ so output of min(number) is ‘1’ and for list variable ‘alphanumeric’, let’s take ASCII code of list value ‘x’ is 120,’A’ is 65 and in ‘abc’ value, ASCII code of ‘a’ is 97. If comparing ASCII values, 65 is smaller than 120 and 97 so output of min(alphanumeric) is 65 which is indicated by ‘A’.
In this tutorial, you have learned how to use python min of list by using min(list) function.
If you have a inquiry or doubt don’t hesitate to leave them in comment. we are waiting your feedback.But remember to understand the concept very well, you need to practice more.
Hopefully, it was clear and concise.
Similar Python list type Function:
- lists : is a form of data collection where different type of data can be stored and separated by commas(,).
- max(list) : It returns a minimum value of a list.
- type(list) : It returns a maximum value of a list.
- len(list) : It returns type of list , if passed variable is a list.
- list(seq) : It converts a sequence/string into a list.
- del(list) : It deletes whole list or individual list element or all element of a list.
Python tutorials list:
- Python tutorials list : access all python tutorials.