What is the purpose of double slash in python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the purpose of double slash in python?

30th Dec 2017, 6:28 PM
Madhusudan Vratesh
2 Answers
+ 3
Its floor division/integer division. It only returns the integer part of the division truncating the fractional part. so: 10/3 = 3.33333333333335 10//3 = 3 try running this in the playground to see the difference print(10/3) print(10//3)
30th Dec 2017, 6:47 PM
ChaoticDawg
ChaoticDawg - avatar
+ 3
integer division
30th Dec 2017, 7:01 PM
Somasundaram R
Somasundaram R - avatar