Python2 | Python3 |
1. Division operator works like C language. | 1. Division Operator works like floating division. |
2. Here range() and xrange() function both are available. | 2. Here only range() function is available which is similar to xrange() function. |
3. raw.input() and input() both functions are available. | 3. Only input() function is available which is equivalent to raw.input() method in Python2 |
4. Implicit type is ASCII | 4. Implicit type is UNICODE. |
5. We can print hello world in Python2 as
print "hello world" |
5. We can print hello world as
print("hello world") |
Note** You don't have to remember these points at all, this is just for basic difference between Python2 and Python3. As now, the support for Python2 has been discontinued, so we can say that Python3 is now the future.
Be First to Post Comment !
Post a Comment