Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:11,750 --> 00:00:19,220
And when and welcome in this new video in this video, we are going to talk about tipple analysts.
2
00:00:20,980 --> 00:00:31,300
In the previous video, we have seen that we can store data in a variable, but we have only seen that
3
00:00:31,300 --> 00:00:35,800
we can store one data in one variable.
4
00:00:36,430 --> 00:00:40,870
But for example, if you want to store.
5
00:00:43,580 --> 00:00:55,790
Many information about one person in one variable, it's not possible with all actual knowledge, so
6
00:00:55,910 --> 00:00:59,480
to do it, we need to use a tipple or a list.
7
00:01:00,410 --> 00:01:05,360
For example, if I want to create a table, it is very simple.
8
00:01:05,900 --> 00:01:19,820
I just have to put all data in parentheses and separate each value by a comma.
9
00:01:22,760 --> 00:01:36,150
The little problem with the tipple is that once we have created portable, we cannot change it.
10
00:01:36,170 --> 00:01:38,080
We cannot add something.
11
00:01:38,090 --> 00:01:40,100
We cannot delete something.
12
00:01:40,490 --> 00:01:46,340
So it can be very interesting sometimes to work with double.
13
00:01:46,790 --> 00:01:51,830
But usually we work with lists.
14
00:01:52,310 --> 00:01:54,920
A list is exactly the same thing.
15
00:01:55,910 --> 00:01:59,300
That tipple, because we need, we can.
16
00:01:59,300 --> 00:02:04,790
So we store many value in one variable using lists.
17
00:02:06,920 --> 00:02:19,520
But later we will can have, for example, no delete, no undue indexing like process, string, etc..
18
00:02:20,240 --> 00:02:30,320
So it is more interesting to work with lists, except for very specific tasks.
19
00:02:31,850 --> 00:02:32,240
So.
20
00:02:34,890 --> 00:02:44,550
To create a list, we do exactly the same thing as before, but to then imitate the list we not use.
21
00:02:47,610 --> 00:02:50,610
Parentheses, but we use brackets
22
00:02:55,050 --> 00:02:59,220
to tell it to Python that it is not a tipple, but at.
23
00:03:00,480 --> 00:03:03,660
So for example, if I want to add.
24
00:03:09,000 --> 00:03:15,660
And no, in the least, I can use the append function to my list.
25
00:03:16,110 --> 00:03:27,960
So and now if I display my list, we can see that this number is in my list.
26
00:03:28,020 --> 00:03:39,990
No, but the append function works only if you want to put a new object one by one if you want, for
27
00:03:39,990 --> 00:03:43,770
example, to add a list.
28
00:03:43,980 --> 00:03:55,020
So if you want to have many object in the same things, we can use this time to extend function.
29
00:03:57,710 --> 00:04:02,720
But we need to put at least as input.
30
00:04:04,070 --> 00:04:05,480
For example, if I put.
31
00:04:11,700 --> 00:04:12,660
We can see that.
32
00:04:13,830 --> 00:04:16,920
No, all lists contain.
33
00:04:19,910 --> 00:04:32,690
This list, plus this number and plus this list, so now we need to talk about indexing.
34
00:04:34,940 --> 00:04:41,690
Indexing in this is exactly the same thing that's for the string.
35
00:04:41,840 --> 00:04:51,530
So, for example, if I want to take the first the value of the list, which is indexing by the value
36
00:04:51,530 --> 00:04:55,880
zero because in Python, we begin to count from zero.
37
00:04:57,560 --> 00:05:08,870
We need to put the name of the lists, then put Aperol brackets and the number of the index that we
38
00:05:08,870 --> 00:05:09,140
want.
39
00:05:12,530 --> 00:05:23,000
If you want to take a specific wrench, we will follow also the exact syntax.
40
00:05:23,930 --> 00:05:25,460
Then the string.
41
00:05:29,560 --> 00:05:39,460
So now, if I want to delete a value in my list, I will use that then up rental, so I put then the
42
00:05:39,460 --> 00:05:43,420
name of the list, I put a pair of rockets.
43
00:05:43,840 --> 00:05:45,400
And now in.
44
00:05:47,270 --> 00:05:54,200
The pair of rocket, we need to put the index of the value that we want to delete.
45
00:05:54,680 --> 00:05:58,490
So if I want to delete the one, I will put zero.
46
00:06:05,230 --> 00:06:09,580
And as we can see, the one as been deleted.
47
00:06:13,990 --> 00:06:14,380
But.
48
00:06:18,110 --> 00:06:27,440
And now we have just seen a list containing members, but a list can contain.
49
00:06:29,740 --> 00:06:38,510
All the type of object, for example, a list can contain Boolean string, et cetera, but it can cause
50
00:06:38,530 --> 00:06:41,110
it can also contain a list.
51
00:06:42,760 --> 00:06:46,520
For example, we can do a list of the list.
52
00:06:46,540 --> 00:07:03,400
So if they create a new list, we can put a list then and then burned, then string, etc. And if I
53
00:07:03,400 --> 00:07:14,050
want to extract only the third list here, I can do it using the indexing.
54
00:07:15,040 --> 00:07:26,140
So we just have to put Z because the first object of the list is this sub list and it is the first object
55
00:07:26,140 --> 00:07:30,520
of the list, so it is indexing by the value zero.
56
00:07:33,500 --> 00:07:41,120
So now if I want to extract the value putting.
57
00:07:44,750 --> 00:07:56,050
We can do it using a double indexation, because as we can see, this first indexation give you give
58
00:07:56,810 --> 00:08:00,730
us the simplest and.
59
00:08:03,510 --> 00:08:08,340
So to extract the 15, we just have to index.
60
00:08:10,100 --> 00:08:16,490
The simplest so we need to do the first indexing on their list.
61
00:08:16,550 --> 00:08:21,410
My list and a double indexing on the sub lists.
62
00:08:23,260 --> 00:08:25,300
Which contained 115.
63
00:08:25,660 --> 00:08:36,190
So now 15 is at the second position in the list, so we need to index by the value one.
64
00:08:40,040 --> 00:08:51,200
So now we have seen a lot of things about toppled and lists, and I will invite you again to play with
65
00:08:51,200 --> 00:09:03,540
all this operation because it is honestly, really important to muster all the patent part to abort
66
00:09:03,560 --> 00:09:04,610
the next chapter.
67
00:09:04,880 --> 00:09:15,440
Because if it's in the next chapter, when we are going to talk about trading and application in Python,
68
00:09:15,830 --> 00:09:27,200
if you're not comfortable with the Python notion, you will be not comfortable with the algorithmic
69
00:09:27,200 --> 00:09:30,740
trading by extension because we need to code.
70
00:09:31,310 --> 00:09:37,490
So I will invite you to play with all the thing that we have seen.
6814
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.