Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
0
1
00:00:00,750 --> 00:00:07,960
Now you know three data types in Python, you know integers, you know strings, and you know floats.
1
2
00:00:08,100 --> 00:00:10,770
These are simple data types.
2
3
00:00:10,770 --> 00:00:18,870
We also have what is known as compound data types,
types that are made of different objects.
3
4
00:00:18,900 --> 00:00:21,700
And the list is a most popular one.
4
5
00:00:21,720 --> 00:00:24,930
So in a list you can actually store multiple objects.
5
6
00:00:25,230 --> 00:00:31,490
Let's suppose you are a teacher and you want to calculate the average grade of your students.
6
7
00:00:31,590 --> 00:00:38,290
So you use Python for that, and you need a data structure to store those values in Python.
7
8
00:00:38,340 --> 00:00:44,400
You need the proper type in Python to represent
the grades of your students.
8
9
00:00:44,400 --> 00:00:46,110
And list would be a good choice.
9
10
00:00:47,550 --> 00:00:50,450
Well let's create a list, store it in a variable
10
11
00:00:50,450 --> 00:00:59,000
as usual student grades equal to open square brackets, close square brackets so the objects
11
12
00:00:59,000 --> 00:01:02,190
now will go inside this syntax.
12
13
00:01:02,570 --> 00:01:08,060
So you saw that with integers you would use a number without quotes for strings to tell Python that
13
14
00:01:08,060 --> 00:01:15,010
that is a string you use double or single quotes and with lists you use these square brackets.
14
15
00:01:15,020 --> 00:01:17,900
So every type has its own syntax.
15
16
00:01:17,900 --> 00:01:23,880
So let's say [9.1, 8.8, 7.5 ].
16
17
00:01:23,930 --> 00:01:26,150
Those are the grades of your students.
1773
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.