Python Presentation
Python Presentation
Data Type
Lists: Data type in
Python
Definition:
Built-in Data type that store
values
(Sequence of elements)
Versatile data type as it can
contains elements of different
data types
Dynamic length (lists are
mutable)
Creation of a Lists
First, let’s have a look at some
examples and then, let’s come up
with a definition:
prices = [1.20, 0.75, 4.50]
somePrimes = [1, 3, 5, 7, 11, 13]
underTheBed = [3, "old socks“]
Accessing element from a list
sub-list[2]=“English”
Thank You