Hello, everyone. And welcome back to intrude a python here on cyber Eri on demand. You're watching lesson seven, the final lesson of module one, and you're watching it here with me. Your instructor, Joe Perry,
today in less than seven, What we're gonna cover are the Four Python data types are actually more than four python data types. But these are the four we're gonna worry about strings, numbers, lists and dictionaries. So we're gonna try and do this all in one fell swoop. We're gonna just run through each of them. Each of these, by the way, is actually going to be the subject of its own lesson
in module. Two strings, numbers, lists and dictionaries all get a deep dive lesson in
module too. So don't worry too terribly much if you don't necessarily know what all or how to use all of them at the end of this video, most of them were just there so that we know we know what they are and are familiar with, um when we see them in the code for the next module.
So the first example strings
you may remember from our variable, uh, lesson variables are Tupperware for your brain.
They're just places to store. Data strings and python are delineated are denoted rather
by using quotes either double or single quotes.
In this case, you can write something. For example,
we are the knights who say
you don't know that reference That is a money python reference. In fact, in the name of the Python programming language I didn't mention it before is actually a reference to Monty Python. So you're gonna see a lot of jokes about money Python When you're going through
code and documentation in tutorials for this language,
X is now the stream. We are the knights who say ni, we can print X as we've done with hello world,
and it will work just fine. In fact, instead of doing credits,
We could have simply set that string ableto a variable
imprinted it that way.
Now it's worth noting that, you know, in a lot of cases strings people will want to just print the string directly.
It's not a terrible situation to do that in python. Pythons are relatively memory safe language, so you can usually get away with directly printing strings. But when you're working with some modules, for example, Sequel. You usually want to interpret it through a variable because there are ways you can implement security by using the variable instead of just using mystery directly. And then, of course,
having variables where people can store in put strings is always essential.
So those were strings. Wrong command those air strings. Now we're gonna go ahead. We're gonna talk about numbers in python on numbers and python work exactly the same way that strings do, except they're created without quotes.
Now, if you're familiar with other languages, you may know that in for example, see, there are a whole bunch of different types of number. There are integers. There are
floats there bulls, which are actually just numbers and see their bulls. There are Long's their doubles, their words or quad words, all sorts of different types of number in python. Those are all abstracted out, and you just have numbers so you can have Z equals 1.24 You could have Z equals. You could have w equal
14 over to anything, and of course, that will actually evaluate out
and just performed seven. Now you'll notice that that seven has a decimal like the 1.24 did. But neither of these numbers had that. That's because division and python automatically assigns afloat, afloat under the hood, so it's still usable as a normal python number. But you will see the decimal place because Python is interpreting it as a float, which is an editor with decibel
You can do math and python. I actually often use Python just four map because it's often faster than
finding the calculator and opening that up.
So, for example, seven to the 13th power you confined with seven Star Star 13 you could do normal addition.
Well, not what I meant to do. There
you can do subtraction.
And, of course, you can store the result of these things
numbers in Python. Pretty straightforward. You're gonna use those all the time. As I mentioned, they're often used for control values or to interpret menus or for all sorts of other things. But that's all numbers are in Python
now in the next video, because we're going to run up against our time here. In the next video, we're gonna discuss the next to Python data types, lists and dictionaries and those air to abstracted data types. We're gonna spend a little bit of time off.
Thank you for watching. As always, I'm your instructor, Joe Perry. I'm very happy to have you here. An intro. The python on Cyber Eri on demand.