Hey, in this video I want to compare Python with other programming languages such as Java, C++, etc.
So Python and these other programming languages are all high level programming languages.
So let's look at an example here.
We have two pieces of code, this one here and this one in here.
They both do the same thing, but they are written in different languages.
This one here, as you can tell, is in Python.
So it's very concise.
All we have to do is write the print function and then followed by the string in parentheses, and that
will print out that text in the command line.
Now, this code here does exactly the same thing, but this is written in Java.
So as you can tell now, Java compared to Python is written in more lines of code.
And actually, this is one of the main differences between Python and other programming languages.
So Python is very concise and that has made it one of the best programming languages.
Now you might say, well, does Java has have any advantages?
Well, yes, it does.
Generally, programs written in Java tends to run faster.
However, nowadays with computers getting more and more powerful, that is becoming a difference, which
is less important that than it was before.
Now, another difference is that Java is a statically typed language and Python is a dynamically typed
language.
What that means is that a variable you declare in Java is associated with a type.
For example, it's it could be associated with a type of string or an integer type, and you cannot
change that during the course of the program.
But in Python, once you you write a variable x is equal to one, you can reassign that variable.
For example, in the next line you can say x is equal to how low the hello string.
So you're changing the type of variables.
And also another difference is that Python is an interpreter.
Language and Java or C++ are compiler languages, which means that once you write Java codes, you first
need to translate it into machine code using a compiler, and then that is run to give you the output.
But Python is still run on the fly by the interpreter, and this is also related to the fact that compiled
languages are faster, so Java tends to run faster compared to Python.
However, Python is best used for web development and data science, and Java excels in things like
graphical user interfaces on desktops or desktop apps or mobile apps.
So Python is not so good in mobile apps or desktop apps.
So if you after web development, data science automating things, then Python is the best way to go.
So with that, I think I give you a general idea of where Python stands compared to other programming
languages.
So thanks for following.
See you later.