Python Division Operator
The division operator ‘/ ‘ performs standard division, which can result in a floating-point number. However, if both the dividend and divisor are integers, Python will perform integer division only if the result is an integer. Otherwise, it will produce a floating-point result.
Example
In the above example, we are performing division between two integers, 10 and 3. The result of dividing 10 by 3 is 3.3333333333333335
Python3
# Division operator result = 10 / 3 print (result) |
Output:
3.3333333333333335
Difference between / vs. // operator in Python
In this article, we will see the difference between the / vs // operator in Python