Instructor: Welcome back.
When we talked about lists, we saw our special type of None
where some methods that worked on lists
didn't really produce anything.
They modified the lists in place,
but the output of whatever they were doing,
was this thing None.
Remember how we had in the output, this None?
What does that mean?
If you remember,
I mentioned None as a special data type
that exists in Python
and most languages have something like this
to represent the absence of value.
In some other languages you might have heard of Null
which is another thing that, again,
represents the absence of value.
Now, why is this useful?
Well, for now it's hard to really conceptualize it.
We'll see it being used a lot more
as we get further into the course,
but I could do something like a = None.
Let's say for example, we're just starting a video game
and in this video game, we have a user's weapons.
But when you're just starting the game
there are no weapons that the user has.
Well, in that case,
we might wanna assign the variable weapons.
Maybe in our code we use this variable,
but we also wanna know
that this user doesn't really have any weapons,
it's None.
So this is completely valid Python.
If I run this, I get None.
And we'll explore this a little bit more
throughout the course,
like I said, but hopefully this way you're not
intimidated when you see it, as the name suggests,
it's just nothing.