01 Lists
,Lists in Python
•A list is a container which is used to store a list of values of any
type. It can store heterogeneous type of data.
•It is a mutable data structure. We can change the elements of a
list in place.
•It stores data in an organized manner.
•Data stored in the list are called elements.
•Each element can be accessed with the help of
the index number.
•The index number starts with 0.
•The list elements are stored within
square brackets [].
, Lists in Python
Examples
• L = [22, 35, 21, 27, 31]
• L = [“Apple”, “Orange”, “Mango”, “Grapes”]
• L = [ 9.3, 8.35, 9.44, 38.25]
L = [“Apple”, 25, “Orange”, 40, “Mango”, 100]
,Lists in Python
•A list is a container which is used to store a list of values of any
type. It can store heterogeneous type of data.
•It is a mutable data structure. We can change the elements of a
list in place.
•It stores data in an organized manner.
•Data stored in the list are called elements.
•Each element can be accessed with the help of
the index number.
•The index number starts with 0.
•The list elements are stored within
square brackets [].
, Lists in Python
Examples
• L = [22, 35, 21, 27, 31]
• L = [“Apple”, “Orange”, “Mango”, “Grapes”]
• L = [ 9.3, 8.35, 9.44, 38.25]
L = [“Apple”, 25, “Orange”, 40, “Mango”, 100]