Python was developed at a time when many other dynamics and open-source programming languages like Tcl, Perl, Ruby etc. were also being actively developed and gaining popularity.
The below-given image depicts the python logo then vs Python logo now.
In January 1994, the first version of Python 1.0 was released. This python version includes the major new features like the functional programming tools filter, reduce, map, and lambda etc.
then after 8 years, the next major release was made. This release was Python 3.0 also known as”Py3K” or “Python 3000”.
• In this python version, Print is a function
• Instead of lists, in this version, we have Views and iterators
• In this python version, we have more simplified rules for ordering comparisons. For example, we cannot sort a heterogeneous list, because each element of a list must be comparable to other elements.
• In this python version, int. long is also an int as there is only one integer type.
• In this python version, when we divide two integers it resultant returns is a float instead of an integer. We can use “//” to have the “old” behavior.
• In this python version, Instead of Unicode Vs. 8-bit we have Text Vs. Data
• The one drawback of Python 3.0 is that it is not backward compatible with Python 2.x.
|Factor||Code||Python 2.0 output||Python 3.0 output|
|Print function||print ‘Hello World’print(‘Hello, intellipaat’)||Hello WorldHello, intellipaat||SyntaxError: invalid syntaxHello, intellipaat|
|Division operator||print(7 / 5)
print(-7 / 5)
except NameError, err:
print err, ‘Error Caused’
|name ‘trying_to_check_error’ is not defined Error Caused||File “new.py”, line 4
except NameError, err:
SyntaxError: invalid syntax
#we need to add as in place of comma after NameError to make it work
The latest version of Python is 3.7.0. This stable version was released on 27 June.
The Python 3.7 version is aimed at making complex tasks simple, and It is currently in production release. The improvements to Python 3.7 version include:
• Data classes that reduce boilerplate when working with data in classes.
• A “development mode” for the interpreter.
• A new built-in for triggering the debugger.
• UTF-8 mode that uses UTF-8 encoding by default in the environment.
• A potentially backward-incompatible change involving the handling of exceptions in generators.
• Nanosecond-resolution time objects.
With this, we have come to an end of this module. In the next module, we will be going through the installation process of Python in Windows, Linux and Mac operating systems. See you there.Previous Next
Download Interview Questions asked by top MNCs in 2019?