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

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.

主站蜘蛛池模板: 互助| 嘉禾县| 长子县| 临潭县| 孝昌县| 津市市| 湖州市| 新绛县| 宁河县| 于田县| 原阳县| 东兰县| 义乌市| 巫山县| 宜良县| 彭水| 资兴市| 东丽区| 溧水县| 镇远县| 军事| 大丰市| 涟源市| 色达县| 龙里县| 新竹市| 河东区| 通辽市| 梅河口市| 长顺县| 黑河市| 海安县| 灌云县| 屯门区| 元阳县| 枣庄市| 鄂伦春自治旗| 红河县| 仪征市| 青铜峡市| 比如县|