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

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.

主站蜘蛛池模板: 乌海市| 吉木乃县| 溧阳市| 仙桃市| 平安县| 余江县| 白河县| 东乌珠穆沁旗| 墨玉县| 翼城县| 遂溪县| 嘉黎县| 中西区| 辛集市| 镇江市| 逊克县| 建德市| 伊川县| 恩平市| 始兴县| 油尖旺区| 达日县| 临城县| 湟中县| 平武县| 淅川县| 嫩江县| 巴青县| 济阳县| 青阳县| 探索| 旺苍县| 汤原县| 万盛区| 长海县| 广昌县| 宁夏| 衡水市| 元氏县| 鄄城县| 礼泉县|