在python2.7中:
$ python2.7
Python 2.7.5+ (default, Feb 27 2014, 19:37:08)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 5/3
1
>>> 5//3
1
>>> 5.0/3
1.6666666666666667
>>> 5.0//3
1.0
>>> 5.2//3
1.0
>>>
$ python3
Python 3.3.2+ (default, Feb 28 2014, 00:52:16)
[GCC 4.8.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 5/3
1.6666666666666667
>>> 5//3
1
>>> 5.0//3
1.0
>>> 5.2//3
1.0
>>>