python in%, //, / difference between the three

%: Denotes a modulo corresponds MOD, i.e. the calculated remainder of the division, such as 5% 2 == 1

Is often used to determine whether divisible, such as: i% 3 == 0

@: Represents integer division, i.e., the result returns a largest integer not greater than

/: Expressed, floating point division, i.e., the floating-point return result

 

Guess you like

Origin www.cnblogs.com/GumpYan/p/12346355.html