Explore Courses Blog Tutorials Interview Questions
0 votes
in Python by (19.4k points)

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

1 Answer

0 votes
by (27.5k 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.

Related questions

0 votes
1 answer
0 votes
1 answer
asked Sep 23, 2019 in Python by Karan Singh (4.1k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.4k questions

32.5k answers


108k users

Browse Categories