November 2018
Beginner
304 pages
7h 35m
English
While most Python 2.7 code is compatible with 3.x code, you can see that certain things don't carry over well. For example, Python 2 truncates the output of division calculations:
# Python 2>>> 7/23
Python 3, as the following shows, provides the remainder when dividing. This is important to remember, as the code you're writing will break if it uses features or side effects of a particular version but is run on a different version:
# Python 3>>> 7/23.5
Read now
Unlock full access