10 ms·
FWIW that comparison would’ve been identical in Python 2, where to get floating point division in Python would’ve been: >>> 1//2
by ochoseis 2y ago
FWIW that comparison would’ve been identical in Python 2, where to get floating point division in Python would’ve been:
>>> 1//2
- roelschroeven 2y ago1//2 always resulted in an integer, even in Python 2, with or without "from __future__ import division". To get floating point division in Python 2, you had to convert at least on of the operands to float (much like in C or C++). You can try it online at tio.run, they still have Python 2 among their available languages, as well as Python 3.