Python version

Python version 2 vs 3


What is python 2?

         Python is widely used for application development such as Google,You tube etc.It is easy to learn, write and read.It supports both procedural and object oriented programming language.Python is an interpreter that does not run the whole code at once but it check the code line by line and finds the error will be displayed without proceeding further and gives the error message to the user.


What is python 3?

            Python is mainly developed for adding more feature and in order to bugs error.Python 2 and Python 3 is differ in syntax and handling.Python 3 is popular for adding more feature continuously.It implement multi-threading, supports GUI(graphical user interface).


Difference between Python 2 and Python 3:



Python 2 gets minimum support and additional features.

Python 3 gets maximum features continuously and easy to fix error.

Print Function

In Python 2 no need of using parenthesis,
print “Good Morning”

In Python 3 parenthesis is must.
eg, print(“Good Morning”).

Integer Division

Integer division return integer answer.7/3 is 2

Integer division returns float answer.7/3 is 2.0

Unicode support

In Python 2 In order to make string Unicode .should use a code ‘u’.Eg, u “hi”

String is Unicode by default in Python 3.


If you want to know more about python then here the best Python institute in Chennai 


Comments