Built-in functions of list in python
There is some built-in functions used in Python List.
#1 len()
#2 max()
#3 min()
#4 sum()
#5 sorted()
Let’s take one by one built-in functions of list in python with example.
#1 len()
sports = [ ‘Cricket’, ‘Hockey’, “Football’, ‘Tennis’, ‘Volleyball’ ]
Output
#2 max()
max() function is used to determine the maximum number in the list.
Output
#3 min()
min() function is used to determine the minimum number in the list.
Output
#4 sum()
sum() function is used to the addition of all elements in the list.
Output
#5 sorted()
The sorted() function is used to sort the list but it does not make any changes to the original list.
Output
Now you have learned Built-in functions of list in python
Important Links: Informatics Practices
What is Python List
Characteristics of Python List
How to Create Python List
How to Traverse a list in Python
How to Manipulate list in Python
How to Modify multiple elements in Python list
Slicing in Python List