We will be seeing the difference between Python2 and Python3. We know that Python3 is not developed on top of python3. So, some features that was present in the python2 was deprecated in latest version.
- Parenthesis () was not mandatory with the print function in python2.
- Python2 has two input version input() and raw_input().
- Integer division in python2 view give rounded the nearest integer. If you divide 3/2. It will give 1 in pthon2.
- There are two functions range() and xrange() which returns list and an object respectively.
- Parenthesis () is mandatory in print function.
- There is only one input() function to take input from keyboard.
- Integer division in python3 will give as per result. If you divide 3/2. It will give 1.5 in pthon3 which is more intuitive for new programmer.
- In python3, xrange() function of python2 is rename as range().