Please what this in python // | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please what this in python //

30th Dec 2022, 9:19 PM
Gavis
Gavis - avatar
1 Answer
+ 11
Gavis , this a division operator for an integer division (also called floor division) print(7/5, 7//5) the result of 7/5 is 1.4 (which is a float value), the result of 7//5 is 1 (which is an integer value). so the operator // cuts off the digital places and returns an integer value.
30th Dec 2022, 9:26 PM
Lothar
Lothar - avatar