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

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.

主站蜘蛛池模板: 兰考县| 讷河市| 澳门| 陇西县| 余庆县| 南安市| 竹山县| 临西县| 九龙县| 镇江市| 岚皋县| 化德县| 云和县| 筠连县| 芜湖市| 宝清县| 连平县| 棋牌| 肥西县| 夏邑县| 黄大仙区| 崇州市| 黑龙江省| 乌审旗| 安达市| 卓资县| 襄城县| 宁城县| 正阳县| 清水县| 明溪县| 黄山市| 三台县| 云林县| 平罗县| 含山县| 宜丰县| 怀来县| 柘城县| 兴义市| 平谷区|