What is

What is Python and Why use it?

Introduction

There are over seven hundred programming languages. Yes! more than seven hundred. But not all of them are popular. Most of the programmers won’t even know the ninety-five percent of these seven hundred programming languages. Although many different programming languages are used worldwide, only a few of them are popular.

This is the list of most popular programming languages among the professional developers in 2019 according to the StackOverflow survey. The top three languages are associated mostly with web development. The web development world is huge. Talking about other high-level programming languages(except javascript), python is above all including java, C++, and swift, making it one of the most popular and used programming languages. But what is python and why is it so popular among the developers?

What is python?

By definition, python is a dynamically-typed high-level object-oriented programming language. If you are a beginner, you might have been thinking, why name a programming language after a snake, right? So before moving further, let’s discuss why python was named Python. Guido van Rossum created python in the late 1980s. He was a fan of the BBC TV show Monty Python’s Flying Circus. And so he just named his new programming language after it. Basically, it wasn’t named after a snake.

Why python?

The most important question, why python? why not java or C++, or any other high-level programming language? One main reason is that python is way programmer-friendly when compared to other high-level programming languages. In simple words, it is easier to code in python. Its syntax is simple and an absolute beginner can catch it easily. Let me compare python’s syntax with the syntax of other programming languages.

Class Sample

{
    public static void main(String args[])
    {
        System.out.println("Hello World!");
    }
}

This is the java code that prints a simple ‘Hello World!’ message. Now have a look at the C++ code for the same.

#include <iostream>
int main() {
    std::cout << "Hello World!";
    return 0;
}

Let’s see how can we print the same message in python.

print("Hello World!")

That’s it! Now compare these three code samples, you will notice yourself the difference python can make. There are no semi-colons in python. Yes! You don’t need to put a semi-colon at the end of every line. This makes python more developer-friendly. Professional developers will agree on this. Although, usage of indentation instead of curly braces can be frustrating at some times, but in my experience, there is no big deal in it. And in python, you don’t have to declare variable types. That’s another relief in python. Moreover, python is an object-oriented programming language that supports functional programming. Many programmers feel that using objects and classes in python is easier when compared to Java and C++.

Conclusion

I won’t conclude that Python is the best programming language in the world. Actually, no one can conclude this because every programming language has its pros and cons. But python indeed is the easiest of them. Currently, there are two versions of Python – 2.x and 3.x. There is some difference in their syntax but most of it is the same. In 2014, it was announced that the 2.x version will be supported until 2020. So if you are planning to learn python, go for version 3.x.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Close
Close