0
If Python is a strongly typed language, why does it convert integers to floats during division?
5 Respuestas
+ 3
Guido decided so.😉
In python 2 the conversion wasn't done
+ 1
Use floor division //
0
Doesn't it?
0
Yes it does, but why?
0
Ali Rezaei you can use integer division operator in case if you don't won't float conversion.
print(2/3) #float division
print(2//3) #interger divsion