Difference between ‘/’ and ‘//’ in Python Division
The below table shows the differences with proper examples
Feature |
Division Operator (/) |
Floor Divsion Operator (//) |
---|---|---|
Return Type |
Floating-point. Returns in integer only if the result is an integer |
Integer |
Fractional Part |
Returns the fractional part |
Truncates the fractional part |
Examples |
|
|
Difference between / vs. // operator in Python
In this article, we will see the difference between the / vs // operator in Python