- Python Data Structures and Algorithms
- Benjamin Baka
- 115字
- 2021-07-09 19:45:01
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.
推薦閱讀
- C# 7 and .NET Core Cookbook
- R語言數據分析從入門到精通
- 基于差分進化的優化方法及應用
- Java 9模塊化開發:核心原則與實踐
- Responsive Web Design by Example
- Android程序設計基礎
- 計算機應用基礎實踐教程
- JavaScript應用開發實踐指南
- Hands-On Neural Network Programming with C#
- OpenCV Android Programming By Example
- 愛上C語言:C KISS
- Python Programming for Arduino
- Learning Grunt
- STM8實戰
- Drupal 8 Development Cookbook(Second Edition)