Okay.
Welcome back.
Now it is time to go and start learning something about list in Python.
Okay, let's create a list of py.
Now we have it here.
Okay.
List is another type of thing.
Another type in Python.
Okay.
So how can we create a list in Python.
So let's create a variable first.
Let's name it name or list I don't know how to name it.
Let's name it is equal to.
So in list we use square bracket okay.
So here I'm going to give some names.
For example name add.
And then use comma to separate each value.
The next one is going to be John.
Next one is going to be Ali okay.
Right now our list has three value.
So I want to print all the values.
So I use print and then names and then hit It control.
Is this camera in here and use Python list.py.
Right now you see we have all everything right here.
Okay so this is one way that we can print this.
And remember lists in Python lists are indexed.
Okay.
So this has index number zero.
This one has index number one.
This has index number two.
So here I am going to specify that okay.
So let's use number one I want to print the first one or the second one okay second one.
And let's see which one is going to be printed.
So you see it has gone.
Now if I use zero.
And here you see it is giving me name okay.
So what if I want to.
And from zero up to two okay.
This is another way we can do it.
It will give me zero and number one.
And the last one is not going to be defined.
So if you want to see number uh if you want to see only two so you need to specify that by three.
So what if I don't give anything.
Okay.
And now you see, it is giving me all.
If I have more, it will give me four.
So that means we start from here and then it's continue until it's finished.
And also we can do that like this too for example.
Now I'm going to tell this that start from the beginning up to number three.
So now it will give me all and everything if I change it back to number two.
It will only give me two of them okay.
Name it and John.
What if I ask for the last one and now it's only giving me a list?
So it is how list work.
Okay.
We can store a lot of things inside.
List.
Not just name or string.
We can do a number as well.
Okay.
So save it and let's remove the index right now.
Okay.
Now you see we have named John Li one two and two three.
So that is how it works.
That is called list.
So let's go and see what is tuple.
And also what is it.
What is a dictionary.
And a lot of thing okay.
See you.