- 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.
推薦閱讀
- Oracle 11g從入門到精通(第2版) (軟件開發(fā)視頻大講堂)
- 微服務與事件驅動架構
- Learning ArcGIS Pro 2
- SQL Server 2012數(shù)據(jù)庫技術及應用(微課版·第5版)
- Getting Started with PowerShell
- 軟件架構:Python語言實現(xiàn)
- Java Web程序設計任務教程
- Arduino家居安全系統(tǒng)構建實戰(zhàn)
- Android應用案例開發(fā)大全(第二版)
- 玩轉.NET Micro Framework移植:基于STM32F10x處理器
- Java EE項目應用開發(fā)
- Offer來了:Java面試核心知識點精講(框架篇)
- Java面試一戰(zhàn)到底(基礎卷)
- Python全棧開發(fā):數(shù)據(jù)分析
- Office VBA開發(fā)經(jīng)典:中級進階卷