What is the difference between Python 2.7 and 3.6? - ProProfs Discuss
Advertisement

What is the difference between Python 2.7 and 3.6?

Asked by C. OWENS, Last updated: Feb 04, 2023

+ Answer
Request
Question menu
Vote up Vote down

1 Answer

Charlie Rogers

Charlie Rogers

Management is the key to success

Charlie Rogers
Charlie Rogers, Manager, Bachelor of Management Studies (BMS), Lexington, Kentucky

Answered May 19, 2020

Originally, Python was developed by Guido Van Rossum in the late 1980s. It started to be implemented in 1989, and the first official version which was python 0.9.0 was released in the year 1991. One of the differences between the python 2.7 and python 3.6 is the way they treat the "print" statement differently.

In python 2.7, "print" is a special statement that does not need arguments in a pair of parentheses before it can execute. Whereas, in python 3.6, the print ( ) happens to be a built-in function, and it requires that you put arguments between the parentheses before it can execute. In addition, the python 2.7 is known to have two string types, which are Unicode and non-Unicode strings.

Whereas, in python 3.6, all strings are Unicode strings by default. The xrange ( ) function in python 2.7 is used in creating alterable objects; while the xrange ( ) function in python 3.6 is changed to range ( ) function.

upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.