1
00:00:01,390 --> 00:00:03,610
Programming realization of.

2
00:00:03,610 --> 00:00:11,470
Today I want to talk about Python types such as lists and strings.

3
00:00:11,590 --> 00:00:13,600
So previously in the code.

4
00:00:16,490 --> 00:00:24,630
We had the list to dos defined in here, so we manually typed in that list.

5
00:00:24,650 --> 00:00:31,250
We typed in the square brackets and so on, and then we added items to that list using the append method.

6
00:00:31,610 --> 00:00:33,530
But this is not the reality.

7
00:00:33,530 --> 00:00:34,960
In real life.

8
00:00:34,970 --> 00:00:42,500
You don't normally create lists inside your Python scripts.

9
00:00:42,500 --> 00:00:43,880
So normally.

10
00:00:45,760 --> 00:00:49,210
Lists are created automatically.

11
00:00:50,520 --> 00:00:54,290
From other external files such as the text file.

12
00:00:54,300 --> 00:01:00,060
So our list in our case was created at this.

13
00:01:01,370 --> 00:01:05,630
Points in here to do equal to file that read lines.

14
00:01:08,440 --> 00:01:17,620
So far that red Lines returns a list and that is the same data type as writing a list with square brackets

15
00:01:17,620 --> 00:01:18,280
in Python.

16
00:01:18,280 --> 00:01:21,040
So it is exactly the same data type.

17
00:01:22,530 --> 00:01:25,840
The same goes for other data types, for example, strings.

18
00:01:25,860 --> 00:01:33,180
Sometimes you do write things in your script, such as this message here, so you type in the double

19
00:01:33,180 --> 00:01:35,790
quotes, you write in the text and so on.

20
00:01:35,790 --> 00:01:43,800
But most of the times you will probably get texts from external text files, from databases.

21
00:01:43,800 --> 00:01:49,800
So for example, again, in our case, the text this time is part of that list.

22
00:01:49,800 --> 00:01:52,860
So it's a list of strings that we get in here.

23
00:01:54,750 --> 00:02:01,230
So just to make sure you understand what I'm saying, I will execute that line in the Python console.

24
00:02:02,460 --> 00:02:05,640
So create a file object and then create a list.

25
00:02:07,530 --> 00:02:16,680
So to those is just a list, just like we get type for that manually typed list, we get type list.

26
00:02:17,040 --> 00:02:18,670
The type of to dos.

27
00:02:18,690 --> 00:02:19,870
Here is also a list.

28
00:02:19,900 --> 00:02:21,980
It is exactly the same object.

29
00:02:21,990 --> 00:02:24,030
And these are also strings.

30
00:02:24,480 --> 00:02:31,800
So if you want to check the type of to dos with index zero, you can do that and you get a string.

31
00:02:31,800 --> 00:02:36,960
Because to dos with index zero gives you a string.

32
00:02:36,960 --> 00:02:38,100
So prepare.

33
00:02:39,870 --> 00:02:44,160
So this is what I wanted to point out in this realization.

34
00:02:44,160 --> 00:02:46,890
Video about data types.

35
00:02:47,870 --> 00:02:52,400
In Python and how they interact with your program.

36
00:02:54,150 --> 00:03:00,780
So these are structures that Python has made available to handle the data.

37
00:03:01,650 --> 00:03:03,620
I hope this makes sense and I'll talk to you later.

38
00:03:03,670 --> 00:03:04,050
See you.

