Instructor: Welcome back.
Whenever you start to learn Python,
it's unavoidable that you'll encounter this topic
of Python 2 versus Python 3.
So, what is this all about?
And it's a very important topic.
Now, first of all, Python is created by a human, right?
As a matter of fact,
it was created by this person, right here.
His name is Guido.
Now, a programming language is always evolving.
It's not like somebody creates a programming language,
it's perfect, and that's it.
No.
All programming languages are constantly being updated.
Just like on your phone,
you constantly get software updates.
Well, a programming language is constantly evolving
to make it better and better
because nobody gets it right the first time.
And by the way,
this is a great video that I'm gonna link to.
You can check it out in the resources.
Now, Python was created in 1991 by this gentleman
and it was actually created with the name from Monty Python,
which was a British comedy group.
But like I said before,
the language is always evolving.
And in 2008, Guido decided that, well, Python version two,
which has been used for a very long time,
had some things that he and the community wanted to change.
So, in 2008, they decided to create Python 3,
a new version of the language.
Here was the tricky part.
You see, when you update software,
let's say, on your phone,
or even on your laptop,
you expect things to keep working, right?
Updates are usually good, they're improvements.
But some of the features that Python 2 had,
they didn't like or they wanted to change completely.
So, Python 3 introduced what we call "breaking changes".
That is, if you updated to Python 3,
remember, the Python interpreter,
the C Python translator that we've been talking about?
Well, as soon as you updated that,
your Python 2 code wasn't really going to work.
It's like updating your phone
and then all of a sudden,
all your apps stop working.
That doesn't sound very good, does it?
That's pretty much what happened in 2008.
Most companies that wrote their code in Python version 2
just kept Python version 2 because, well,
for them to upgrade meant that they had to go
through their code line by line and make some changes.
Now, these changes weren't that significant.
For example, I'll link to some resources,
but don't worry.
These are topics that we're gonna cover
throughout the course.
But different things wouldn't work.
For example, the print function,
which we've learned about,
in Python 2, it didn't have the brackets.
It looked like this.
And Python 3 used the brackets.
So, all the code that had print like this would break.
Now, the differences themselves aren't that big.
I mean, you can read through them
and we'll talk about this in the course,
but overall, you can learn them in a day.
That's why when we learn Python,
most of the time we're learning Python 3,
but you can use the same knowledge
with the older version of Python.
Now, you may see some Python version 2 code out there
for companies that haven't upgraded,
but it's now what we call "legacy",
that is, come 2020,
it's going to stop receiving security updates.
So, the community, Python community as a whole,
is saying, "Hey, everybody, start using Python 3
because we're gonna stop maintaining Python 2."
So, we're going to learn the most up-to-date version 3
in this course,
but we're also going to touch on some older topics
that Python 2 covers,
just in case you encounter them when you work for a company
that perhaps still supports legacy code.
But as I mentioned, the whole community
as a whole is moving towards Python 3.
This website, for example,
shows you how many big packages, popular Python packages,
which we'll talk about, support Python 3.
In our case, there's only four popular packages
that don't support Python 3.
So, what I'm saying is Python 3 is the way to go.
It's the way of the future.
That's what we're going to learn in the course,
but I want you to be aware of the historical context.
And one thing to be careful of, when,
in this course,
you're searching for answers,
or maybe I have some exercises
that require you to Google things.
For example, if we go to the Python documentation,
which is the reference of how, well,
what the programming language does,
you'll see that you can choose the versions here.
And you always want to go with the latest,
but you might find some answers online
that still use Python version 2.
So, you want to make sure that,
when you're searching for answers,
that you don't encounter any legacy code.
Like I said, 95% of the time, it's mostly the same,
but you usually want to keep current with the language.
It has the most community support,
most up-to-date,
most secure language.
So, just a quick note about Python 3 versus Python 2.
When you hear the word "Python",
people are generally just talking
about both Python 3 and Python 2.
And if you remember,
in our Repl, when we created our first program,
you see that you're using Python version 3.6.
This is the default standard version that Repl comes with.
So, right away we know that we're using Python 3.
Awesome.
It's up to date, it's new,
the whole community is behind it.
Well, most of the community is behind it.
So, we're all good to go.
I'll see you in the next video.
Bye-bye.