+ 2
How does the functioning of // and % differ in python and other languages
query about the use of operator
2 Respostas
+ 4
% operator is the same for all languages as far as i know, and returns the remainder
// is floor division in python (maybe in some other languages as well, not quite sure) which returns the integer part of a division, for example:
7/2 == 3.5
7//2 == 3
+ 3
thanks a lot