Home>Article>Backend Development> What is the operation symbol of [//] in python?
[//] in python is an arithmetic operation symbol, indicating integer division. It will return the integer part of the result, such as [print(7//2)], and the output result is 3. The arithmetic operation symbols in Python include [ ], [-], [*], [%], etc.
//Operator means downward division, it will return the integer part of the integer division result
(Recommended tutorial:python Video tutorial)
print(7//2) #3
Here, after integer division, it will return 3.5
Similarly, when performing the exponentiation operation, ab will return a raised to the power b
print(2**10) #1024
Finally, %Performs the modulo operation and returns the remainder of the division
print(13%7)#6 print(3.5%1.5)#0.5
Related recommendations:python tutorial
The above is the detailed content of What is the operation symbol of [//] in python?. For more information, please follow other related articles on the PHP Chinese website!