1
00:00:01,200 --> 00:00:08,400
Hey, in this video I want to compare Python with other programming languages such as Java, C++, etc.

2
00:00:08,790 --> 00:00:14,280
So Python and these other programming languages are all high level programming languages.

3
00:00:14,430 --> 00:00:16,500
So let's look at an example here.

4
00:00:17,550 --> 00:00:21,670
We have two pieces of code, this one here and this one in here.

5
00:00:21,690 --> 00:00:26,400
They both do the same thing, but they are written in different languages.

6
00:00:26,430 --> 00:00:29,490
This one here, as you can tell, is in Python.

7
00:00:29,490 --> 00:00:31,050
So it's very concise.

8
00:00:31,350 --> 00:00:39,030
All we have to do is write the print function and then followed by the string in parentheses, and that

9
00:00:39,030 --> 00:00:42,510
will print out that text in the command line.

10
00:00:42,540 --> 00:00:49,050
Now, this code here does exactly the same thing, but this is written in Java.

11
00:00:49,500 --> 00:00:57,270
So as you can tell now, Java compared to Python is written in more lines of code.

12
00:00:57,510 --> 00:01:02,370
And actually, this is one of the main differences between Python and other programming languages.

13
00:01:02,370 --> 00:01:08,580
So Python is very concise and that has made it one of the best programming languages.

14
00:01:09,770 --> 00:01:15,770
Now you might say, well, does Java has have any advantages?

15
00:01:15,800 --> 00:01:17,190
Well, yes, it does.

16
00:01:17,210 --> 00:01:22,670
Generally, programs written in Java tends to run faster.

17
00:01:23,300 --> 00:01:31,460
However, nowadays with computers getting more and more powerful, that is becoming a difference, which

18
00:01:31,460 --> 00:01:34,910
is less important that than it was before.

19
00:01:34,940 --> 00:01:41,630
Now, another difference is that Java is a statically typed language and Python is a dynamically typed

20
00:01:41,630 --> 00:01:42,440
language.

21
00:01:42,590 --> 00:01:50,120
What that means is that a variable you declare in Java is associated with a type.

22
00:01:50,120 --> 00:01:56,540
For example, it's it could be associated with a type of string or an integer type, and you cannot

23
00:01:56,540 --> 00:01:59,930
change that during the course of the program.

24
00:01:59,930 --> 00:02:05,870
But in Python, once you you write a variable x is equal to one, you can reassign that variable.

25
00:02:05,870 --> 00:02:11,450
For example, in the next line you can say x is equal to how low the hello string.

26
00:02:11,450 --> 00:02:14,600
So you're changing the type of variables.

27
00:02:14,900 --> 00:02:18,980
And also another difference is that Python is an interpreter.

28
00:02:18,980 --> 00:02:27,800
Language and Java or C++ are compiler languages, which means that once you write Java codes, you first

29
00:02:27,800 --> 00:02:37,460
need to translate it into machine code using a compiler, and then that is run to give you the output.

30
00:02:37,460 --> 00:02:46,730
But Python is still run on the fly by the interpreter, and this is also related to the fact that compiled

31
00:02:46,730 --> 00:02:51,950
languages are faster, so Java tends to run faster compared to Python.

32
00:02:52,820 --> 00:03:03,230
However, Python is best used for web development and data science, and Java excels in things like

33
00:03:03,230 --> 00:03:08,000
graphical user interfaces on desktops or desktop apps or mobile apps.

34
00:03:08,000 --> 00:03:11,930
So Python is not so good in mobile apps or desktop apps.

35
00:03:12,320 --> 00:03:18,920
So if you after web development, data science automating things, then Python is the best way to go.

36
00:03:18,920 --> 00:03:24,830
So with that, I think I give you a general idea of where Python stands compared to other programming

37
00:03:24,830 --> 00:03:25,400
languages.

38
00:03:25,400 --> 00:03:26,420
So thanks for following.

39
00:03:26,450 --> 00:03:26,990
See you later.

