the division operator should result the float value the same operator should run in both python version 3 and 2.7 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

the division operator should result the float value the same operator should run in both python version 3 and 2.7

in python 3 and 2.7 the common division operator is // but this returns the interger value, which common division operator returns float value

6th Dec 2018, 3:41 AM
Initiator
1 Answer
+ 1
In Python 3.x, the // operator is for floor division. You can use the / operator for true division.
6th Dec 2018, 3:57 AM
Kishalaya Saha
Kishalaya Saha - avatar