Why did Python become so popular?

              As a programmer, my first experience with Python was miserable due to the bracket-less syntax of the program, indentation-based code, lack of knowledge about the proper Python IDE, and the QGIS environment where I had to code in Python. I was already confused by the myriad features of QGIS and its working mechanisms (which I still don't fully understand). Despite this, I enjoyed my time and work because I love delving into new technologies, especially Python due to its growing popularity and acceptance in the field of data science.

Python is a general-purpose language. Recently, it has gained immense popularity for several reasons:


Source: octoverse github



Source: Stackoverflow survey 2017



source: IEEE spectrum


The success of Python not only stops here: StackOverflow's recent trends are also depicted the popularity of Python as you can see below the graph, Python has already surpassed Java and close to JavaScript.
source: StackOverflow trends
So, in the world of programming, Python is heading towards even more popularity. But what makes it so well-liked, especially considering its initial release dating back to 1991? This curiosity led me to delve into the reasons behind Python's popularity, and without any particular order, I've come across the following facts about Python:

Simplicity & Readability:

Python resembles the English language and often employs common English words such as "in," "None," "not," and "def" for defining functions, and "import," among others. Instead of using curly brackets or special keywords to demarcate code blocks, Python relies on white-space indentation for this purpose (although I personally prefer curly brackets). Furthermore, Python requires fewer lines of code to achieve the same tasks. For instance, if you wish to print "Salam World," you can simply write:

print("Salam World")

However, consider what happens when you attempt the same task in languages like C#, Java, or C/C++. Developers familiar with these languages are well-acquainted with concepts like #include, system namespaces, the main function, and more, all of which are essential even for executing a single line of code.

Library:

One of my colleagues recently asked me how to install a package, library, or framework in Python. I advised him to enter the following command in the command line: pip install yourDesiredPackageName. To our surprise, it took just about a minute to complete, and my friend exclaimed, "This is incredibly simple!" And indeed, it truly is simple – there's an extensive array of libraries and frameworks available that can be installed in a matter of minutes.

Python offers a vast collection of standard and third-party libraries (e.g., Flask, Django, TensorFlow, Pandas, NumPy, etc) catering to a range of domains such as data science, artificial intelligence, machine learning, AI, web development, game development, and more. The best part is that these libraries are remarkably straightforward to install.

Data-Science Support:

Python has emerged as the top choice in the field of data science, surpassing even its close contender "R." This achievement can be attributed in part to Python's exceptional library support, which includes widely acclaimed libraries like sciPy, NumPy, and Pandas.

Other reasons include:

  1. Open Source: freely available and modifiable, fosters innovation!
  2. Python finds extensive use in the scientific domain and academic research, and it's increasingly being adopted as the primary programming language in many schools and universities. Its robust community support is a driving force behind its popularity, bolstered by influential sponsors.
  3. Versatility: Python's success story is evident across various domains: The language finds widespread application in diverse platforms and fields, encompassing embedded devices such as Raspberry Pi applications, web development, desktop software, data science, machine learning, gaming (with tools like pygame), server configuration, or automation.
  4. It enjoys substantial documentation from third-party sources.
  5. One of Python's standout features is its accessibility to newcomers. Even with minimal effort, beginners can create functional code.
  6. Moreover, Python's cross-platform compatibility sets it apart; it runs seamlessly on Windows, Linux, and macOS.
  7. An important endorsement comes from Google, the corporate supporter of Python, further solidifying its significance in the programming landscape.

In conclusion, it's evident that Python's popularity can be attributed to a variety of factors, including its simplicity, extensive library support, widespread adoption in research and educational institutions, and its pivotal role in the realm of data science.

Should I have missed any critical aspects of Python's popularity, please do inform me. I'm more than eager to learn and share any additional insights.