The Python language was designed and written by Guido van Rossum who was working at Centrum Wiskunde & Informatica (CWI), Netherlands.
He began working on it in the late 1980s and it was highly inspired by the ABC language. Its first official version came out in 1991.
Python 2.0, released in the year 2000, introduced the notable feature of garbage collection, which was capable of collecting the reference cycles.
Python 3.0, released in the year 2008, came up with some major and improved revisions of the language, which is not totally
backward compatible with Python 2.0 i.e. the code written in Python 2.0 may have some difficulties executing with Python 3.0.
Hence, the recent releases of Python 3 include the 2to3 utility, which somehow automates the translation of Python 2 code to Python 3.
Recently in July 2018, the author of Python - Guido van Rossum, stepped down from his position of Python's Benevolent dictator for life (BDFL), but he shares his leadership to overlook and perform the smooth translation of Python 2 to Python 3 and the overall progress of Python.
Python supports multiple paradigms
Python supports multiple programming paradigms i.e. programming styles, such as -
Procedural - By writing a list of commands to execute, where the execution takes place from top to bottom.
Functional- By creating functions to pass it the raw data to get the desired result.
Object-Oriented - by encapsulating data and its behaviour into objects.
Advantages of Python
Easy to read and code: Python is one of the easiest languages to learn and code.
One of the greatest strength of Python is its code readability.
The code of a Python program is much simple and easier to understand as compared to the code written in C, C++ or Java.
For example, unlike C, C++ or Java which require the use of curly braces { } to encapsulate lines of code belonging to a particular method or class,
Python does not require us to use any curly braces and all we have to do is give a proper indentation to lines of code, in order to associate them with a method or class.
That is also why, to replicate a program or an application coded in C or Java to Python, much fewer lines of code is required.
Reliable: Important features of Python like "Garbage Collection" frees a programmer from worrying about
memory management,
which wasn't possible with C++. Another feature of Python - Exception Handling, reduces the possibility of a Python application
crash, fatal errors and thus
boosts its reliability.
Platform Independent:
Python is a cross-platform language, which means that we can write a program in Python which can be executed on any platform i.e.
Windows/Mac/Unix systems etc by just transferring the
files of the program to the target system and executing them and no compilation is necessary.
This gives portability boost to the Python programs and makes them platform independent.
Interoperability: Python is a very powerful high-level programming language and therefore, using it alone, we
cannot directly access hardware and perform low-level data structure manipulations but Python being an interoperable language can be integrated
with other low-level programming languages like C.
This allows us to create a different kind of applications
which could be as simple and small as a text editor and can be as big and complex as a computer game/audio-video applications/web applications/system administration application etc.
Note: Did you know that one of the most widely used applications, Instagram, uses the
Django web framework, which is written entirely in Python.
A huge standard library : One of the biggest advantages of Python is its vast standard library which provides us many important modules and functions, using which we could perform several complicated tasks in only a few lines of code.
Apart from using its standard library, we could use several third-party libraries, which allow us to perform specialized tasks with ease.
An example of an important third-party library is NumPy, which provides us high-level mathematical functions to work with arrays, matrices and manipulating numerical data.
Object Oriented : Although Python supports various programming paradigms, at its core, Python is an object-oriented language, where we could encapsulate the data and methods
in the form of objects and classes.
Many features of OOP(Object Oriented Programming) paradigm are also present in Python, such as :
a) Object and classes
b) Encapsulation
c) Inheritance
d) Polymorphism
If you are not aware of these terms, don't worry! We will discuss these features in detail in the upcoming articles, later on.
Advertisement
Some important features of Python
Control Structures
Python provides useful control structures like if, if-else, switch, while loop, break, continue, etc, which are
useful in controlling the flow of our program or to divert the flow of control. To know more about these control structures in Python, you may begin with Python if statement.
Classes
Like other object-oriented programming languages, Python also supports the feature of classes and objects,
where a class describes its behaviour through its methods,
where a method is a place where the logic of a class is stored.
To begin with classes with Python, you may read our tutorial Classes in Python.
Inheritance
The Python language allows a class to use/inherit the features of another existing class, by supporting the feature of inheritance. For
more on inheritance and the types of inheritance supported by Python, please read inheritance in Python.
Operators in Python
One of the fundamental features of any programming language is its operators. Python language provides different kinds of operators which allow us to easily perform simple to complex mathematical calculations.
Operators such as -
arithmetic, increment, decrement, relational, logical, etc. For more on operators, you can begin at our section
Operators in Python.
Functions
As a program grows, the need for creating functions, where each function perform a specific task becomes prominent.
We could create functions in Python and in order to know more about it, you may begin at our section
how to create a function in Python.
Garbage Collection
In languages like C, C++, you would have to write your own memory management code to make sure there is enough free memory but
Python provides the facility of automatic garbage collection through its facility - Garbage Collector. To know more about it, please
read Garbage Collection in Python.
String
A string is nothing but a sequence of characters within double quotes. To know about how to create strings in Python and its various important methods
available to string objects, please read Python String.
File Input/Output -
File Input/Output classes are used to read/write data from the files.
To know how to perform file input/output operations or to just take input from the user at the console,
please follow our section - File Input/Output in Python.
Exceptions
An exception is an unusual exceptional condition or an error, which occurs during the runtime of a Python program.
To know about exceptions, their various types and how to handle exceptions by using Python,
you may begin at Exception Handling in Python.