WEBVTT

00:00.680 --> 00:01.000
Hi.

00:01.000 --> 00:01.840
Welcome back.

00:02.440 --> 00:04.080
Let's go learn topple.

00:04.520 --> 00:05.440
What is topple?

00:05.480 --> 00:07.480
Topple is just like list.

00:07.520 --> 00:09.920
Let me first create a file here.

00:09.960 --> 00:11.480
Name it topple list.

00:14.200 --> 00:14.360
Dot.

00:14.360 --> 00:14.880
Py.

00:14.920 --> 00:16.920
Sorry, I say topple dot list.

00:16.960 --> 00:18.160
That was incorrect.

00:18.640 --> 00:20.760
Okay, so let's create a topple.

00:20.800 --> 00:23.920
I'm going to name it topple or topple.

00:23.960 --> 00:25.800
Or let's again give name.

00:27.440 --> 00:29.120
Name is equal to a topple.

00:29.160 --> 00:32.320
So topple is start with this small brackets.

00:32.360 --> 00:33.040
Okay.

00:33.080 --> 00:35.960
We have anything which is inside.

00:35.960 --> 00:39.000
This is called each element of a topple.

00:39.040 --> 00:41.240
Again let's go with name.

00:41.680 --> 00:42.160
Okay.

00:44.320 --> 00:46.920
And use comma to separate them.

00:47.200 --> 00:50.080
And Ali, we have two things here right now.

00:50.200 --> 00:52.120
Okay I am going to print this.

00:52.640 --> 00:55.320
And that is it.

00:55.440 --> 00:58.280
Save it and let's run it from here.

00:59.760 --> 01:06.920
Now instead of py list.py, I'm going to use Apple dot pi and hit enter.

01:06.960 --> 01:09.600
Now you see we have something like this.

01:09.800 --> 01:11.640
It's also indexed okay.

01:12.000 --> 01:15.880
We can find for example the first index.

01:17.560 --> 01:21.760
And it will give me the first one if you want to see the second one.

01:21.760 --> 01:27.560
So I use one and Ctrl ace and that is it.

01:27.560 --> 01:28.280
Okay.

01:28.280 --> 01:30.680
So this is Apple.

01:30.720 --> 01:35.120
And also there is a lot of operation that we can do on this apple.

01:35.120 --> 01:47.800
And for example we can move using a loop to print all these elements that is into the tuple.

01:48.480 --> 01:52.560
And also we can add we can clear a lot of things that we can do okay.

01:52.600 --> 01:58.360
For example, if I use a for loop and you haven't studied for loop yet, we later we will cover that

01:58.360 --> 01:58.760
okay.

01:59.040 --> 02:05.760
So let's use for x in the name of the tuple which is name right now okay.

02:05.800 --> 02:12.090
For example I want to print all and everything which is the inside.

02:12.410 --> 02:13.850
This couple.

02:15.690 --> 02:20.650
And now if I save it, come here and print it.

02:21.210 --> 02:22.530
It gives me nothing.

02:22.770 --> 02:26.530
That is because I haven't painted yet.

02:30.290 --> 02:33.170
Okay, see, it is giving me Neymar and then Alli.

02:33.370 --> 02:39.170
You may ask what is the difference between printing like this and also printing only the name?

02:39.210 --> 02:39.450
Okay.

02:39.490 --> 02:41.330
While you're using only the name.

02:41.330 --> 02:48.610
So it will give you these brackets this, this and also all things.

02:48.610 --> 02:57.930
But while you are printing using a for loop, it will give you only the element okay.

02:57.970 --> 03:06.850
So it is how we can use a for loop to navigate to a tuple list even dictionary.

03:07.210 --> 03:13.770
But don't be worry if you don't know anything about for loop in the future we will be covering them.

03:13.770 --> 03:14.170
Okay.

03:14.490 --> 03:15.370
So see you.
