In Python syntax, / is a division, for example: 2/3 = 0.6666. And // means division by rounding down, for example, 3 // 2 = 1, 6.0 // 4 = 1. That is, / returns a floating-point type result, and // returns an integer result (can be understood as the integer part of /).
The role and usage of / and // in python
Guess you like
Origin blog.csdn.net/weixin_36670529/article/details/105146470
Ranking