What Is Python 3?
What Is Python 3?
What Is Python 3?
What is Python 3?
On December 2008, Python released version 3.0. This version was mainly released to fix problems
which exist in Python 2. The nature of these change is such that Python 3 was incompatible with
Python 2. It is backward incompatible Some features of Python 3 have been backported to Python
2.x versions to make the migration process easy in Python 3.
As a result, for any organization who was using Python 2.x version, migrating their project to 3.x
needed lots of changes. These changes not only relate to projects and applications but also all the
libraries that form part of the Python ecosystem.
Basis of
Python 3 Python 2
comparison
Release Date
2008 2000
Function print
print ("hello") print "hello"
Whenever two integers are divided, you When two integers are divided, you
Division of Integers
get a float value always provide integer value.
Unicode In Python 3, default storing of strings is To store Unicode string value, you
Unicode. require to define them with "u".
The syntax of Python 2 was
Syntax The syntax is simpler and easily
comparatively difficult to
understandable.
understand.
Rules of ordering In this version, Rules of ordering Rules of ordering comparison are
Comparisons comparisons have been simplified. very complex.
Iteration The new Range() function introduced to In Python 2, the xrange() is used for
perform iterations. iterations.
Exceptions
It should be enclosed in parenthesis. It should be enclosed in notations.
String Method: