All About Python.

All About Python

Why you Should Learn Python.

Today, I will explore the Python pros and cons, and How Python fit into the grand scheme of things, And also gives you insight if Python is Programming language that you should learn next.

Why I learn Python.

I am PHP & NodeJS developer with 4 years experience in Laravel, ExpressJS and ReactJS, But I love to explore new programming languages and frameworks.
In hundreds of Programming languages available today , from mature languages like C and C++ , to new entries such as Ruby, C# and Lua, to enterprise giants like Java and Objective C , Choosing a language to learn is difficult and time-consuming task. Although no language is right choice for every tasks, But I think that Python is very good choice for number of programming problems and best for when you are start to learn programmming .

There are Hundreds of thousands of programmer who use Python daily to solve their programming problems, Python has very living, engaging and great community where you can find solutions of nearly every problem. The great thing is that Python programmers are continuously increasing and community is getting larger and larger.

Why Python attracts new Programmer.

1 . Python is truly Cross-Platform language, running equally-well on Windows, Linux/Unix and MacOS.
2 . Can be used in smart-phones to supercomputers, there no scalability issues with python.
3 . Python is free, you will never pay a single penny to Python creator.
4 . Powerful and easy to use Graphical User Interface(GUI) toolkit , web programming libraries, and more.

Where Python Rocks

Python is a modern programming language developed by Dutch programmer Guido Van Rossum. Python has some limitations but at the same time python is very excellent language which can use for multiple tasks.

1 . Python is super easy to learn and use.

People having previous experience in programming will find python very easy to learn. All the programming basic constructs loops, conditional statements , arrays, and so forth — are included , and much easier to use due to python elegant syntax, here are reason why you will find python very easy.

  1. Types are associated with only objects not variables.
  2. Python typically operates at much higher level of abstraction.
  3. Syntax are very simple.

Python is best language for rapid application development. It isn’t unusual for coding and application in Python to take one-tenth the time it would in C or Java and to take as little as one-fifth the number of lines of code as in equivalent C program. So Python is best language for rapid prototyping.

2. Python is Expressive

Python is a very expressive language. Expressive in this context means that a single line of Python code can do more than a single line of code in nearly every other popular programming language.

3. Python Code is highly readable.

Python code is highly readable because , in Python indentation is not for code readability , but python insists that blocks of code be indented, otherwise it will throw syntax errors.
Here is a comparison between program written in python and perl.

Perl Version

sub pairwise_sum {
my($arg1, $arg2) = @; my @result; for(0 .. $#$arg1) { push(@result,$arg1->[$] + $arg2->[$_]);
return(\@result);
}
}

Python version

def pairwise_sum(list1,list2):
result = []
for i in range(len(list1))
result.append(list1[i] + list2[i])
return result

4. Python is complete — “Batteries included”

Another advantage of python is its ‘Batteries included’ philosophy when it comes to libraries. The simple idea is that when you install Python you have everything you need to do real work, without need to install additional libraries.
For example , with Python you can write a web server to share the files in directory with just two line of code, this is the power of python.

import http.server

http.server.test(HandlerClass=http.server.SimpleHttpRequestHandler)

Where to avoid Python (Cons of python)

Although Python has many advantages, no language can do everything , so Python isn’t perfect solution for all you needs , to decide whether Python is best for you , you have to decide it for yourself , by analyzing python drawbacks.

1. Python isn’t the fastest programming language

A possible drawback with Python is its speed of execution, Python is not fully compiled language , this means python it’s first compiled to an internal byte-code form , which is then executed by Python interpreter.

Python doesn’t have the most libraries

Although Python comes with an excellent collection of libraries, and many more are available , Python doesn’t lead in this department. Language like Java, C , C++ and Perl have even larger collection of libraries.

2. Python doesn’t check variables types at compile time.

Unlike in some language where variables are container , python variables are just labels which references other various object : integer, strings, classes instances, whatever.

3. Python doesn’t have much mobile support

In the past decade the number and types of mobile devices are exploded, but Python isn’t a stronger player in this space.

4. Python doesn’t use multiple processors well

Multiple-core processors are everywhere now , producing significant increases performance in many situations. However, the standard implementation of Python isn’t designed to use multiple cores due to feature called the global interpretor lock.


							

Post Author: timur_ul_hasan

2 thoughts on “All About Python.

    Chandni

    (March 12, 2019 - 6:27 pm)

    Nice blog

      timur_ul_hasan

      (March 12, 2019 - 6:28 pm)

      Thanks Chandni

Leave a Reply

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