What is the difference between a slash and a 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 difference between a slash and a double slash in python

the difference between 2/3 and 2//3

14th Feb 2017, 2:02 PM
sriranga
2 Respostas
+ 2
2/3 produces a float (0.6666...) 2//3 produces an integer (0 in this case)
14th Feb 2017, 2:28 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
0
OK thanks
15th Feb 2017, 1:30 AM
sriranga