0 votes
1 view
in Python by (20k points)

What is the difference between Python 2.x and Python 3.x?

1 Answer

0 votes
by (28.4k points)
edited by

There are some major and some minor changes in the upgrade from 2.x to 3.x.

Print function:

Python 2.x: print ‘Hello World’

Python 3.x: print(‘Hello world’)

Division operator:

Python 2.x: print(7/5) output: 1, print(-7/5) output: -2

Python 3.x: print(7/5) output: 1.4, print(-7/5) output: -1.4

There are so many more, go ahead and explore them in depth. Here's a tutorial series you can refer to. 

You can check out this video to get started with python.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...