Programming realization of.
Today I want to talk about Python types such as lists and strings.
So previously in the code.
We had the list to dos defined in here, so we manually typed in that list.
We typed in the square brackets and so on, and then we added items to that list using the append method.
But this is not the reality.
In real life.
You don't normally create lists inside your Python scripts.
So normally.
Lists are created automatically.
From other external files such as the text file.
So our list in our case was created at this.
Points in here to do equal to file that read lines.
So far that red Lines returns a list and that is the same data type as writing a list with square brackets
in Python.
So it is exactly the same data type.
The same goes for other data types, for example, strings.
Sometimes you do write things in your script, such as this message here, so you type in the double
quotes, you write in the text and so on.
But most of the times you will probably get texts from external text files, from databases.
So for example, again, in our case, the text this time is part of that list.
So it's a list of strings that we get in here.
So just to make sure you understand what I'm saying, I will execute that line in the Python console.
So create a file object and then create a list.
So to those is just a list, just like we get type for that manually typed list, we get type list.
The type of to dos.
Here is also a list.
It is exactly the same object.
And these are also strings.
So if you want to check the type of to dos with index zero, you can do that and you get a string.
Because to dos with index zero gives you a string.
So prepare.
So this is what I wanted to point out in this realization.
Video about data types.
In Python and how they interact with your program.
So these are structures that Python has made available to handle the data.
I hope this makes sense and I'll talk to you later.
See you.