Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> 6/3
- 2
- >>> 6//3
- 2
- print (2/3) ----> 0 Python 2.7
- print (2/3) ----> 0.6666666666666666 Python 3.5
- print (4/2) ----> 2 Python 2.7
- print (4/2) ----> 2.0 Python 3.5
- from __future__ import division
- print (2/3) ----> 0.6666666666666666 #Python 2.7
- print (4/2) ----> 2.0 #Python 2.7
- 138.93//3 ---> 46.0 #Python 2.7
- 138.93//3 ---> 46.0 #Python 3.5
- 4//3 ---> 1 #Python 2.7
- 4//3 ---> 1 #Python 3.5
- >>> print 5.0 / 2
- 2.5
- >>> print 5.0 // 2
- 2.0
- >>> 7//3
- 2
- >>>print 5//2
- 2
- >>> print 5.0//2
- 2.0
- >>>print 5//2.0
- 2.0
- >>>print 5.0//2.0
- 2.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement