0
What does // do?
I saw it in a piece of code
7 Respostas
+ 3
It's the floor division in Python. And it should be 3//5 and not 3\\5
+ 1
In many languages it's a comment but not in the one you tagged, Python.
If can expect better help if you could provide the code.
+ 1
3//5 = 0
5//3 = 1
0
Sorry, say,
X= 3\\5
0
Its int division or something
It behave kinda like division in c/c++ if divisor is int, where the result is floored to int
0
Thank you!
0
What about when it is in front of words, such as:
print("Hello \\World!")
Is that just an error, or does it count the number of letters or something?