What is the purpose of double slash in python? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

What is the purpose of double slash in python?

30th Dec 2017, 6:28 PM
Madhusudan Vratesh
2 Respostas
+ 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