What is python list
A python list is a container that contains different Python objects like Integers, String, values. It is same as array in other programing languages. A list can be represented by square brackets. List is mutable hence list can be modified or updates.
Example :-
[ 10, 20, 5, 15 ]
[ ‘Ajay’, ‘Sachin’, ‘Rohit’ ]
Types of Python List
1. Homogeneous List
If a python list contains the same type of values then it will be called as Homogeneous List.
Example :-
[ 5, 7, 4, 10 ]
[ ‘Raju’, ‘Vipin’, ‘Sanju’]
we can see both list have same types of values respectivily.
2. Heterogeneous List
If a python list contains different types of values then it will be called as Heterogeneous List.
Example :-
[ 15, 10, ‘Amit’, ‘Raju’ ]
[ ‘Sachin’, ‘Vipin’, ‘Hemraj’, 25 ]
Important Links
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
Built in function of Python List