I'm guessing you're asking for features, rather than simply things that are different. The main advantages Python 3 has:
Generally it's more consistent and polished; legacy cruft has been thrown out completely, and more stuff yields iterators to improve performance and memory usage
Integer division yields a float if necessary, making code more predictable
More flexible rest syntax (e.g. x, y, *rest = range(10)), simplifying code
Keyword-only arguments, which makes your code (and the stdlib) safer by not accidentally mapping positional arguments to keyword arguments
Chained exceptions to improve error reporting when something goes wrong
The asyncio module in 3.4 is excellent stuff
3.5 features async and await syntax similar to ES2015
Also, new features will only be added to the 3.x branch from now on. Python 2.7 is legacy.
This is a very simplified answer since there are tons of other differences, some of them more significant than others, but these are good selling points that might make you want to switch. If you're worried about compatibility with your older code, try 2to3, which can help you make the transition. Most code does not take a very long time to port in my experience, though!
Michiel Sikma
こんにちは〜
I'm guessing you're asking for features, rather than simply things that are different. The main advantages Python 3 has:
x, y, *rest = range(10)), simplifying codeasynciomodule in 3.4 is excellent stuffasyncandawaitsyntax similar to ES2015Also, new features will only be added to the 3.x branch from now on. Python 2.7 is legacy.
This is a very simplified answer since there are tons of other differences, some of them more significant than others, but these are good selling points that might make you want to switch. If you're worried about compatibility with your older code, try 2to3, which can help you make the transition. Most code does not take a very long time to port in my experience, though!