How to Use Lists in Python

Toggle fullscreen Fullscreen button

Sharing buttons:

in this section we're going to look at

the built-in data structures in Python

which are extremely important when

building real applications first we're

going to look at lists and then we'll

look at tuples sets and dictionaries so

earlier you have seen that we can use

square brackets to define a list or a

sequence of objects in between these

brackets we can have objects of any type

so we can have a list of strings like

this and then assign it to a variable

like letters we can also have a list of

numbers boolean or even a list of lists

let me show you so here we have a list

each item in this list will be a list

itself so here's the first item which is

a list of two items now let's add

another item to our main or parent list

this item is also a list with two items

so now we have a matrix which is a two