0
What is the purpose of double slash in python?
2 Réponses
+ 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)
+ 3
integer division