+ 10

What is the different of python version 2.7.3 and version 3.7 ?

I want to know had some functions changed this versions.

5th Nov 2018, 6:48 AM
Mithu
Mithu - avatar
8 Respostas
+ 9
Few things have changed completely, many new things have been added, and several old functions have now extra optional arguments. A quick comparison of the basics that's easier to see: https://www.thecrazyprogrammer.com/2018/01/difference-JUMP_LINK__&&__python__&&__JUMP_LINK-2-3.html
5th Nov 2018, 8:34 AM
Kishalaya Saha
Kishalaya Saha - avatar
+ 4
Valerio Rizzo Because some things in Py2 are not forward compatible, and many old codes are still written in them. Only the other day, Dropbox finally completed migrating from Python 2 to Python 3.6. https://blogs.dropbox.com/tech/2018/09/how-we-rolled-out-one-of-the-largest-python-3-migrations-ever/ But yes, they would eventually stop maintaining Py2. Check out this countdown: https://pythonclock.org/
5th Nov 2018, 9:17 AM
Kishalaya Saha
Kishalaya Saha - avatar
+ 3
Kishalaya Saha Thank you
5th Nov 2018, 9:34 AM
Mithu
Mithu - avatar
+ 3
Not much get change but few syntacs,the way quoatation marks use,result of division gets change
7th Nov 2018, 12:21 AM
Kavish
Kavish - avatar
+ 2
syntax changes
6th Nov 2018, 3:24 AM
Boluwaji Akinsefunmi
Boluwaji Akinsefunmi - avatar
+ 2
1. PYTHON 2 IS LEGACY, PYTHON 3 IS THE FUTURE. Since Python 2 has been the most popular version for over a decade and a half, it is still entrenched in the software at certain companies. However, since more companies are moving from Python 2 to 3, someone who wants to learn Python programming for beginners may wish to avoid spending time on a version that is becoming obsolete. 2. PYTHON 2 AND PYTHON 3 HAVE DIFFERENT (SOMETIMES INCOMPATIBLE) LIBRARIES Since Python 3 is the future, many of today's developers are creating libraries strictly for use with Python 3. Similarly, many older libraries built for Python 2 are not forwards-compatible. You may be able to port a 2.x library to 3.x., but this can be difficult and complicated; it's definitely not a “Python for beginners” type of activity. Computer 3. THERE IS BETTER UNICODE SUPPORT IN PYTHON 3 In Python 3, text strings are Unicode by default. In Python 2, strings are stored as ASCII by default–you have to add a “u” if you want to store strings as Unicode in Python 2.x. This is important because Unicode is more versatile than ASCII. Unicode strings can store foreign language letters, Roman letters and numerals, symbols, emojis, etc., offering you more choices. 4. PYTHON 3 HAS IMPROVED INTEGER DIVISION In Python 2, if you write a number without any digits after the decimal point, it rounds your calculation down to the nearest whole number. For example, if you’re trying to perform the calculation 5 divided by 2, and you type 5 / 2, the result will be 2 due to rounding. You would have to write it as 5.0 / 2.0 to get the exact answer of 2.5. However, in Python 3, the expression 5 / 2 will return the expected result of 2.5 without having to worry about adding those extra zeroes. This is one example of how Python 3 syntax can be more intuitive, making it easier for newcomers to learn Python programming. https://crbtech.in/programmes/java-training-programme
6th Nov 2018, 5:12 AM
meenal deshpande
+ 1
Syntax is also a bit different...but my main question is why they kept 2 different versions and they keep updating both rather than making a smooth transition from one to other long time back so to have just one now? It is actually pretty annoying when you have to deal with snippets or libraries made with 2 and you use 3 đŸ˜„
5th Nov 2018, 8:54 AM
ZMindy
ZMindy - avatar
+ 1
5th Nov 2018, 5:38 PM
Pico
Pico - avatar