What are slashes like '//' called like | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What are slashes like '//' called like

19th Oct 2019, 1:57 PM
Suraj Nagre
Suraj Nagre - avatar
3 Answers
+ 6
In Python, // is the integer division operator. In contrast to the float division operator /, using // will result in an integer value. Compare: print(5//2) print(5/2)
19th Oct 2019, 2:04 PM
Hatsy Rei
Hatsy Rei - avatar
+ 4
Floordivision is the real term for // in Python.
19th Oct 2019, 3:07 PM
Seb TheS
Seb TheS - avatar
+ 2
Integer division - // 5//2 = 2.0 5/2 = 2.5 4//2= 2 4/2= 2.0
20th Oct 2019, 7:15 PM
Manoj
Manoj - avatar