官术网_书友最值得收藏!

Comparison and Arithmetic operators

The standard arithmetic operators (+, -, */) work with all Python numeric types. The // operator gives an integer quotient, (for example, 3 // 2 returns 1), the exponent operator is x ** y, and the modulus operator, given by a % b, returns the remainder of the division a/b. The comparison operators (<, <=, >, >=, ==, and !=) work with numbers, strings, lists, and other collection objects and return True if the condition holds. For collection objects, these operators compare the number of elements and the equivalence operator == b returns True if each collection object is structurally equivalent, and the value of each element is identical.

主站蜘蛛池模板: 保亭| 金川县| 信宜市| 拉孜县| 澄城县| 特克斯县| 邢台县| 太白县| 灵山县| 漳平市| 伊金霍洛旗| 禄丰县| 平远县| 贺兰县| 胶州市| 长治县| 辽阳市| 尼木县| 汾阳市| 铁力市| 易门县| 平湖市| 石城县| 东辽县| 湘阴县| 淅川县| 临夏县| 亚东县| 松潘县| 长沙县| 寿阳县| 安西县| 邹平县| 金门县| 绥中县| 额敏县| 高青县| 宕昌县| 松阳县| 乌拉特前旗| 扶风县|