any remainderregardless of operand types the /performs floor divisionwhich truncates the remainder and returns an integer for integer operands or float if any operand is float in xthe does classic divisionperforming truncating integer division if both operands are integers and float division (keeping remaindersotherwise the /does floor division and works as it does in xperforming truncating division for integers and floor division for floats here are the two operators at work in and --the first operation in each set is the crucial difference between the lines that may impact codec:\codec:\python \python differs in xkeeps remainder same in xkeeps remainder / same in xtruncates remainder / same in xtruncates to floor :\codec:\python \python this might break on porting to / use this in if truncation needed / notice that the data type of the result for /is still dependent on the operand types in xif either is floatthe result is floatotherwiseit is an integer although this may seem similar to the type-dependent behavior of in that motivated its change in xthe type of the return value is much less critical than differences in the return value itself moreoverbecause /was provided in part as compatibility tool for programs that rely on truncating integer division (and this is more common than you might expect)it must return integers for integers using /instead of in when integer truncation is required helps make code -compatible supporting either python although behavior differs in and xyou can still support both versions in your code if your programs depend on truncating integer divisionuse /in both and as just mentioned if your programs require floating-point results with remainders numbers in action