Hello everyone. Welcome back. This lesson we are going to talk about something we use frequency lists. list is actually a sequence of elements. You can consider this is a storage box, which you can install in anything there one by one. First let's talk about the creation.
To create a list we use square bracket to declare. For example, to create a list of color, we create where we oppose colors equals, then we start the decoration open square bracket. Now we are going to put in three items where grew green, close square bracket, then we have two lists. Let's see. If you want to show only a particular element in the list, then we have a way for example we want to show the first admins which is rare then we type colors SEO. This way you may find this strange here Why is zero instead of one.
So that's how Python and most other common programming language design. So you have to remember is start with zero. Colors see rows is red, then colors one is blue, color, two is green. Then start adding items to the lace. Now let's add purple. Then we use the pen function.
You see, purple is add and we also have we move. colors we move Next, we move green. Green is removed from the list. We also have some other functions like extend, extend is combined to a list together to form a bigger list. So let's extend the current knees to a bigger one. So we create another list here were when Yeah, no.
So now to this is combined together now we talk about some helper functions. Sometimes if you wonder what's the type of variable we use type, so you forget what colors is then you type type colors and it tells you it's a list. And on the other hand, we have just talked about a pan remove extent that there are actually more operations you can use. If you want to know them, you type help colors. Then it actually show you all the fun And you can use for this object, which is a list. So we have see a pan or then there's a count counter is returned the number of occurrences of a where do we have index?
We also can insert items to a particular position. So there's a lot of operations you can do and you can refer here. Okay, that's what this is about. in next lecture, we are going to talk about random friends.