Why learn Python
In this blog I would like to write about the reasons why you should learn python. I have designed this article by collecting information from various sources. which are simply credited in various places in this Blog.
First 4 principles are listed below, and you can check the reference section of this blog for other remaining.
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Python is an interpreted high-level general-purpose programming language. Python’s design philosophy emphasizes code readability with its notable use of significant indentation. Its language constructs as well as its object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects. (source: Wikipedia )
The reasons why you should learn python:
It is a language of multi paradigm
Python is dynamically-typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly, procedural), object-oriented and functional programming. Python is often described as a “batteries included” language due to its comprehensive standard library. (source: Wikipedia)
Syntax and semantics
If you write any code in python. you will see the difference. Lets compare a code of python with a code of C language.
This is a code written in C language for printing a string Hello world!
Now to do the same code in Python,
You can see the difference.
- It is a language close to English
- a flexible language,
- easily readable,
- no curly braces for delimiting a block( instead Whitespace indentation used)
- no more mandatory use of semicolons! That means like C language, if you don’t put a semicolon after a statement in python, you no longer get any ugly error.
Forget variable declarations!
If I write a code like this in python,
a = 50
a = 50.6
a = “Hello world”
This is completely safe to do! It is dynamically typed.
Python Libraries are the main attraction:
This is what makes python look like the hot cake! The main reasons why people love Python that much. It has a huge standard library.
Besides that we have third-party libraries that make our every projects fast to implement with python. You are just one click away from knowing about so many available libraries that suite your needs.
Just giving some popular external third-party library name list below so that you could have quick start,
It is a Plotting library that helps us visualize and analyze data.
Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. ( Source: https://matplotlib.org/ )
NumPy is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays. (source: Wikipedia )
In this blog I only mentioned 2 External third party libraries! but as you know we have a a lot of them!
Visit https://pypi.org/ to find, install and publish Python packages with the Python Package Index,
When I am writing this blog (2:28 PM; May 7, 2021), in pypi.org there are ,
External libraries can be installed using pip and importing is so easy that you could import them using the import statement after installation.
I will discuss more about python’s external libraries in future.
To be continued…
Zen of Python - Wikipedia
The Zen of Python is a collection of 19 "guiding principles" for writing computer programs that influence the design of…
PyPI · The Python Package Index
The Python Package Index (PyPI) is a repository of software for the Python programming language. PyPI helps you find…